dble
dble copied to clipboard
Log print error when the number of needing shardingnode defined in function partition_enum.txt more than what is defined on the shardingTable
-
dble version:
5.7.21-dble-3.21.06.99-3af9ca0863baf7f08bebd68ad2c4984f72c9491d-20211013105215 - preconditions :
- single dble
- configs:
db.xml
<dble:db xmlns:dble="http://dble.cloud/">
<dbGroup rwSplitMode="0" name="ha_group1" delayThreshold="100">
<heartbeat>select user()</heartbeat>
<dbInstance name="hostM1" url="172.100.9.5:3307" password="111111" user="test" maxCon="1000" minCon="10" primary="true"/>
</dbGroup>
<dbGroup rwSplitMode="0" name="ha_group2" delayThreshold="100">
<heartbeat>select user()</heartbeat>
<dbInstance name="hostM2" url="172.100.9.6:3307" password="111111" user="test" maxCon="1000" minCon="10" primary="true"/>
</dbGroup>
</dble:db>
user.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE dble:user SYSTEM "user.dtd">
<dble:user xmlns:dble="http://dble.cloud/">
<managerUser name="root" password="111111"/>
<shardingUser name="test" password="111111" schemas="schema1"/>
</dble:user>
sharding.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE dble:sharding SYSTEM "sharding.dtd">
<dble:sharding xmlns:dble="http://dble.cloud/">
<schema shardingNode="dn5" name="schema1" sqlMaxLimit="100">
<shardingTable name="sharding_4_t1" shardingNode="dn1,dn2,dn3,dn4" function="hash-four" shardingColumn="id"/>
<shardingTable name="es_dble_test" shardingNode="dn1,dn2,dn3,dn4" function="enum" shardingColumn="fld_area_guid"/>
</schema>
<shardingNode dbGroup="ha_group1" database="db1" name="dn1" />
<shardingNode dbGroup="ha_group2" database="db1" name="dn2" />
<shardingNode dbGroup="ha_group1" database="db2" name="dn3" />
<shardingNode dbGroup="ha_group2" database="db2" name="dn4" />
<shardingNode dbGroup="ha_group1" database="db3" name="dn5" />
<function class="Enum" name="enum">
<property name="mapFile">partition_enum.txt</property>
<property name="defaultNode">0</property>
<property name="type">1</property>
</function>
<function class="Hash" name="hash-four">
<property name="partitionCount">4</property>
<property name="partitionLength">1</property>
partition_enum.txt
aaaa=0
bbbb=1
cccc=2
dddd=3
eeee=4
ffff=5
-
steps:
step1. start dble -
expect result:
- start fail with correct log information
-
real result:
- The information printed in wrapper.log is incorrect
- The information printed in wrapper.log is incorrect
-
supplements:
1.