Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log print error when the number of needing shardingnode defined in function partition_enum.txt more than what is defined on the shardingTable #2918

Closed
Dinosauria opened this issue Oct 20, 2021 · 1 comment
Milestone

Comments

@Dinosauria
Copy link
Member

  • 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:

    1. start fail with correct log information
  • real result:

    1. The information printed in wrapper.log is incorrect
      image
  • supplements:
    1.

@yanhuqing666 yanhuqing666 added this to the 3.22.07.0 milestone Apr 26, 2022
@Dinosauria
Copy link
Member Author

Verified in 5.7.21-dble-9.9.9.9-2c681fa90b860c310ea997add851ba227089a333-20220812105613
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants