-
Notifications
You must be signed in to change notification settings - Fork 320
Closed
Labels
Configurationconnection-poolresolveproblem has been fixed by developerproblem has been fixed by developerverifiedissue's resolve was verified by testerissue's resolve was verified by tester
Milestone
Description
- dble version:
5.6.29-dble-9.9.9.9-5237257-20181110082345 - preconditions :
no - configs:
schema.xml
<!DOCTYPE dble:schema SYSTEM "schema.dtd">
<dble:schema xmlns:dble="http://dble.cloud/">
<schema name="mytest" sqlMaxLimit="100" dataNode="dn1">
<table name="test_shard" dataNode="dn1,dn2,dn3,dn4" rule="mod-long"/>
<table name="sbtest2" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id"/>
<table name="a_test" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id"/>
<table name="a_order" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id"/>
<table name="a_manager" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id"/>
<table name="test_global" dataNode="dn1,dn2,dn3,dn4" type="global"/>
<table name="global_table2" dataNode="dn1,dn2,dn3,dn4" type="global"/>
<table name="global_table3" dataNode="dn1,dn2,dn3,dn4" type="global"/>
<table name="mytest_auto_test1" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="R_REGIONKEY" autoIncrement="true"/>
<table name="auto_table" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id" autoIncrement="true"/>
<table name="sbtest1" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id"/>
<table name="aly_test" dataNode="dn1,dn2,dn3,dn4" rule="orderID"/>
<table name="aly_test1" dataNode="dn1,dn2,dn3,dn4" rule="orderID"/>
<table name="aly_order" dataNode="dn1,dn2,dn3,dn4" rule="orderID"/>
<table name="aly_order1" dataNode="dn1,dn2,dn3,dn4" rule="orderID"/>
<table name="a_two" dataNode="dn1,dn2" rule="hash-two" primaryKey="id"/>
<table name="a_three" dataNode="dn1,dn2,dn3" rule="hash-three" primaryKey="id"/>
</schema>
<schema name="test" sqlMaxLimit="100" dataNode="dn1">
<table name="test_db1" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id"/>
<table name="test_db2" dataNode="dn1,dn2,dn3,dn4" rule="mod-long" primaryKey="id"/>
</schema>
<dataNode name="dn1" dataHost="10.186.24.45" database="db1"/>
<dataNode name="dn2" dataHost="10.186.24.46" database="db1"/>
<dataNode name="dn3" dataHost="10.186.24.45" database="db2"/>
<dataNode name="dn4" dataHost="10.186.24.46" database="db2"/>
<dataHost balance="0" maxCon="2" minCon="1" name="10.186.24.45" switchType="2" slaveThreshold="100">
<heartbeat>show slave status</heartbeat>
<writeHost host="hostM1" url="10.186.24.45:3306" password="test" user="test">
</writeHost>
</dataHost>
<dataHost balance="0" maxCon="2" minCon="1" name="10.186.24.46" switchType="2" slaveThreshold="100">
<heartbeat>show slave status</heartbeat>
<writeHost host="hostW1" url="10.186.24.46:3306" password="test" user="test"/>
</dataHost>
</dble:schema>
rule.xml
<!DOCTYPE dble:rule SYSTEM "rule.dtd">
<dble:rule xmlns:dble="http://dble.cloud/">
<tableRule name="mod-long">
<rule>
<columns>id</columns>
<algorithm>sharding</algorithm>
</rule>
</tableRule>
<tableRule name="orderID">
<rule>
<columns>id</columns>
<algorithm>sharding</algorithm>
</rule>
</tableRule>
<tableRule name="hash-two">
<rule>
<columns>id</columns>
<algorithm>two-long</algorithm>
</rule>
</tableRule>
<tableRule name="hash-three">
<rule>
<columns>id</columns>
<algorithm>three-long</algorithm>
</rule>
</tableRule>
<function name="sharding" class="Hash">
<property name="partitionCount">4</property>
<property name="partitionLength">1</property>
</function>
<function name="two-long" class="Hash">
<property name="partitionCount">2</property>
<property name="partitionLength">1</property>
</function>
<function name="three-long" class="Hash">
<property name="partitionCount">3</property>
<property name="partitionLength">1</property>
</function>
</dble:rule>
server.xml
<!DOCTYPE dble:server SYSTEM "server.dtd">
<dble:server xmlns:dble="http://dble.cloud/">
<system>
<property name="useGlobleTableCheck">1</property>
<property name="dataNodeHeartbeatPeriod">60000</property>
<property name="sqlExecuteTimeout">1000</property>
<property name="recordTxn">1</property>
<property name="xaRecoveryLogBaseDir">/opt/dble/tmlogs/</property>
<property name="xaRecoveryLogBaseName">xalog</property>
<property name="xaSessionCheckPeriod">2000</property>
<property name="xaLogCleanPeriod">100000</property>
<property name="processors">1</property>
<property name="processorExecutor">4</property>
<property name="sequnceHandlerType">2</property>
</system>
<firewall/>
<user name="test">
<property name="password">test</property>
<property name="schemas">mytest,test</property>
<property name="maxCon">0</property>
</user>
<user name="root">
<property name="password">123456</property>
<property name="manager">true</property>
</user>
</dble:server>
- steps:
step1. set maxCon=200 and start dble,then prepare number
drop table if exists test_shard;
drop table if exists test_no_shard;
create table test_shard(id int,name varchar(33));
create table test_no_shard(id int,name varchar(33));
insert into test_shard set id = 1;
insert into test_no_shard set id = 1;
step2. set maxCon=2 and restart dble
step3. execute select in dble
mysql> select a.id from test_shard a,test_no_shard b where a.id = b.id;
- expect result:
- step3:Return the correct result set
- real result:
- step3:
mysql> select a.id from test_shard a,test_no_shard b where a.id = b.id;
ERROR 1105 (HY000): table test_no_shard is not exists!You should create it OR reload metadata
- supplements:
1.
/label ~BUG
Metadata
Metadata
Assignees
Labels
Configurationconnection-poolresolveproblem has been fixed by developerproblem has been fixed by developerverifiedissue's resolve was verified by testerissue's resolve was verified by tester