Skip to content

when running sysbench oltp test ,XA transaction can't restore correctly after restarting dble #1114

@funnyAnt

Description

@funnyAnt
  • dble version:
    2.19.01.0
  • preconditions :
    • 1、 sudo yum install sysbench
    • 2、edit $SYSBENCH_SCRIPT_HOME/lua-tests/db/oltp.lua ,add db_query("set xa=1") below db_query(begin_query)
    • 3、edit $SYSBENCH_SCRIPT_HOME/oltp.sh, add --mysql-ignore-errors=1205,2013,1213,1003,1062
  • 4、edit $SYSBENCH_SCRIPT_HOME/conf.sh, configure the correct database information
  • configs:

schema.xml


<schema name="dbtest">
		<table dataNode="dn1,dn2" name="sbtest1" rule="mod2" />
   </schema>

	<dataNode name="dn1" dataHost="localhost1" database="sysbench_0" />
	<dataNode name="dn2" dataHost="localhost1" database="sysbench_1" />

rule.xml

<tableRule name="mod2">
		<rule>
			<columns>id</columns>
			<algorithm>hashmod2</algorithm>
		</rule>
	</tableRule>
	<function name="hashmod2" class="Hash">
		<property name="partitionCount">2</property>
		<property name="partitionLength">1</property>
	</function>

server.xml



  • steps:
    step1. execute shell sh oltp.sh on the installed sysbench machine
    step2. restart dble when sysbench is running
    step3. stop sysbench
    step4. execute xa recover on the mysql which is used by dble
  • expect result:
    1. empty result, dble can restore all not completed xa transactions.
  • real result:
    1. There are still some transactions that have not been released
  • supplements:
    1.

/label ~BUG

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions