Skip to content

if dataNode's database is not created, execute ddl will get "lost connection ..." #636

@irene-coming

Description

@irene-coming
  • dble version:
    5.6.23-dble-9.9.9.9-15b3b35-20180809064840

  • configs:

schema.xml

    <schema name="mytest1" sqlMaxLimit="100" dataNode="dn1">
        <table name="test_shard" rule="mod-long" dataNode="dn1,dn2,dn3,dn4"></table>
    </schema>
    <dataNode name="dn1" dataHost="host1" database="db1"></dataNode>
    <dataNode name="dn2" dataHost="host2" database="db1"></dataNode>
    <dataNode name="dn3" dataHost="host1" database="db2"></dataNode>
    <dataNode name="dn4" dataHost="host2" database="db2"></dataNode>
    <dataHost name="host1" maxCon="100" minCon="10" balance="3" switchType="-1" slaveThreshold="100">
        <heartbeat>select user()</heartbeat>
        <writeHost host="hostM1" url="172.20.134.2:3307" user="test" password="ZVBn9YEB6r66OzA3U5GDIGS4c2GRiGBa+MCyQsWjeBI046YyxaRRvOITxNKoEK0gLD95ybRJVjL0SPHzF/Oq+Q==" id="mysql-f021nj" usingDecrypt="1">
        </writeHost>
    </dataHost>
    <dataHost name="host2" maxCon="1000" minCon="10" balance="0" switchType="-1" slaveThreshold="100">
        <heartbeat>select user()</heartbeat>
        <writeHost host="hostW1" url="172.20.134.3:3308" user="test" password="dmi5OkvUCCtTGNWfEcuHIL51JYx3MMUMwUQDSQtKwdTfy4bnaArfoMRNT7M6L23qiK4ghsTPe2NLy9LwURW6sw==" id="mysql-a3ez0w" usingDecrypt="1">
        </writeHost>
    </dataHost>

rule.xml

<tableRule name="mod-long">
<rule>
<columns>id</columns>
<algorithm>sharding</algorithm>
</rule>
</tableRule>
<function name="sharding" class="Hash">
<property name="partitionCount">4</property>
<property name="partitionLength">1</property>
</function>

配置中dataNode上的数据库未创建

  • steps:
    step1. execute sqls:
mysql> create table test_shard(id int);
ERROR 2013 (HY000): Lost connection to MySQL server during query
  • expect result:
    1. give msg like: please create corresponding databases for dataNodes of dn1,dn2,dnX
  • real result:
    1. Lost connection xxx

/label ~BUG

Metadata

Metadata

Assignees

Labels

resolveproblem has been fixed by developer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions