-
Notifications
You must be signed in to change notification settings - Fork 320
Description
- dble version:
5.7.13-dble-2.19.07.0-bff6b5545ab740ee008882bc62a74ea30bcdcb04-20190906020157 - preconditions :
no - configs:
schema.xml
<schema name="schema1" sqlMaxLimit="100">
<table name="sharding_2_t1" dataNode="dn1,dn3" rule="hash-two" />
</schema>
<dataNode dataHost="172.100.9.5" database="db1" name="dn1" />
<dataNode dataHost="172.100.9.5" database="db2" name="dn3" />
<dataHost balance="0" maxCon="4" minCon="3" name="172.100.9.5" slaveThreshold="100" switchType="1">
<heartbeat>select user()</heartbeat>
<writeHost host="hostM1" password="111111" url="172.100.9.5:3306" user="test">
</writeHost>
</dataHost>
server.xml
<property name="dataNodeHeartbeatPeriod">20000</property>
-
steps:
step1. restart dble success
step2. execute manage command "show @@backend;" with port 9066 in dble:
mysql> show @@backend;
+-------------------+------------+---------+-------------+------+----------------+--------+---------+----------------+--------+----------+------------+--------+----------------------+----------------------+-----------------------+--------------------+------------+---------------+----------------+-----------+-----------+
| processor | BACKEND_ID | MYSQLID | HOST | PORT | LOCAL_TCP_PORT | NET_IN | NET_OUT | ACTIVE_TIME(S) | CLOSED | BORROWED | SEND_QUEUE | SCHEMA | CHARACTER_SET_CLIENT | COLLATION_CONNECTION | CHARACTER_SET_RESULTS | TX_ISOLATION_LEVEL | AUTOCOMMIT | SYS_VARIABLES | USER_VARIABLES | XA_STATUS | DEAD_TIME |
+-------------------+------------+---------+-------------+------+----------------+--------+---------+----------------+--------+----------+------------+--------+----------------------+----------------------+-----------------------+--------------------+------------+---------------+----------------+-----------+-----------+
| backendProcessor1 | 1 | 933 | 172.100.9.5 | 3306 | 53604 | 17045 | 176 | 64 | false | true | 0 | NULL | utf8mb4 | utf8mb4_general_ci | utf8mb4 | -1 | true | | | 0 | |
| backendProcessor2 | 2 | 934 | 172.100.9.5 | 3306 | 53606 | 1016 | 189 | 64 | false | false | 0 | db2 | utf8mb4 | utf8mb4_general_ci | utf8mb4 | -1 | true | | | 0 | |
| backendProcessor3 | 3 | 935 | 172.100.9.5 | 3306 | 53608 | 1123 | 189 | 64 | false | false | 0 | db1 | utf8mb4 | utf8mb4_general_ci | utf8mb4 | -1 | true | | | 0 | |
+-------------------+------------+---------+-------------+------+----------------+--------+---------+----------------+--------+----------+------------+--------+----------------------+----------------------+-----------------------+--------------------+------------+---------------+----------------+-----------+-----------+
3 rows in set (0.01 sec) -
expect result:
we need a ditinguishable name for heartbeat connection in step2 -
real result:
we can't tell which is the connection for heartbeat -
supplements:
1.check the processlists in mysql:
mysql> show processlist;
+-----+------+------------------------+------+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+------------------------+------+---------+------+----------+------------------+
| 933 | test | dble-2.dble_test:53604 | NULL | Sleep | 19 | | NULL |
| 934 | test | dble-2.dble_test:53606 | db2 | Sleep | 40 | | NULL |
| 935 | test | dble-2.dble_test:53608 | db1 | Sleep | 40 | | NULL |
| 936 | test | localhost:44392 | NULL | Query | 0 | starting | show processlist |
+-----+------+------------------------+------+---------+------+----------+------------------+
4 rows in set (0.00 sec)