我创建了两个 TDengine 节点集群:
taos> show dnodes;
id | end_point | vnodes | cores | status | role | create_time | offline reason |
======================================================================================================================================
1 | c1:6030 | 2 | 4 | ready | any | 2021-08-09 07:22:56.887 | |
3 | c2:6030 | 1 | 4 | ready | any | 2021-08-09 08:45:27.160 | |
0 | arbitrator:6030 | 0 | 0 | offline | arb | 2021-08-09 10:01:20.084 | - |
Query OK, 3 row(s) in set (0.001770s)
然后创建一个具有副本 2 的数据库。
create database t1 replica 2
然后删除一个节点
taos> drop dnode "c2:6030";
DB error: Out of DNodes (0.000533s)
将副本更改为 1
taos> ALTER DATABASE syslogmd REPLICA 1;
Query OK, 0 of 0 row(s) in database (1.225641s)
再次下降
taos> drop dnode "c2:6030";
Query OK, 0 of 0 row(s) in database (0.000672s)
显示节点
taos> show dnodes;
id | end_point | vnodes | cores | status | role | create_time | offline reason |
======================================================================================================================================
1 | c1:6030 | 2 | 4 | ready | any | 2021-08-09 07:22:56.887 | |
3 | c2:6030 | 1 | 4 | dropping | any | 2021-08-09 08:45:27.160 | status not received |
0 | arbitrator:6030 | 0 | 0 | offline | arb | 2021-08-09 11:08:10.483 | - |
Query OK, 3 row(s) in set (0.001164s)
即使我重新启动 c1,我尝试删除的 dnode 也总是显示“正在删除”。
见下面的日志:
08/09 11:08:40.717213 00003393 SYN vgId:2, nodeId:0, TCP link is broken since Success, pfd:40 sfd:-1
08/09 11:08:40.717218 00003393 SYN vgId:2, nodeId:0, restart peer connection, last sstatus:init
08/09 11:08:40.717222 00003393 SYN vgId:2, nodeId:0, pfd:-1 sfd:-1 will be closed
08/09 11:08:40.717226 00003393 SYN vgId:2, nodeId:0, peer conn is restart and set sstatus:init
08/09 11:08:40.717229 00003393 SYN vgId:2, nodeId:0, check peer connection in 1000 ms
08/09 11:08:40.717235 00003393 SYN vgId:2, nodeId:0, peer role:unsynced change to offline
08/09 11:08:40.717239 00003393 SYN vgId:2, peer:vgId:2, nodeId:1 is master, index:0
08/09 11:08:40.717242 00003393 SYN vgId:2, nodeId:1, it is the master, replica:1 sver:787
08/09 11:08:40.717246 00003393 SYN vgId:2, roles changed, broadcast status, replica:1
08/09 11:08:40.717252 00003393 SYN 0x7f3450365720 fd:40 is removed from epoll thread, num:1
08/09 11:08:41.071643 00003374 MND vgId:3, replica:1 numOfVnodes:2, try remove one vnode
08/09 11:08:41.221637 00003374 MND vgId:3, replica:1 numOfVnodes:2, try remove one vnode
08/09 11:08:41.334033 00003394 SYN vgId:1, nodeId:3, status is received, self:master:init:35, peer:slave:35, ack:1 tranId:48947 type:broadcast pfd:31
08/09 11:08:41.334053 00003394 SYN vgId:1, nodeId:3, peer role:slave change to slave
08/09 11:08:41.334058 00003394 SYN vgId:1, peer:vgId:1, nodeId:1 is master, index:0
08/09 11:08:41.334063 00003394 SYN vgId:1, nodeId:1, it is the master, replica:2 sver:35
08/09 11:08:41.334096 00003394 SYN vgId:1, nodeId:3, status is sent, self:master:init:35, peer:slave:init:35, ack:0 tranId:48947 type:broadcast-rsp pfd:31
08/09 11:08:41.334307 00003393 SYN vgId:3, nodeId:3, status is received, self:master:init:4, peer:slave:4, ack:1 tranId:5605 type:broadcast pfd:34
08/09 11:08:41.334326 00003393 SYN vgId:3, nodeId:3, peer role:slave change to slave
08/09 11:08:41.334331 00003393 SYN vgId:3, peer:vgId:3, nodeId:1 is master, index:1
08/09 11:08:41.334336 00003393 SYN vgId:3, nodeId:1, it is the master, replica:2 sver:4
08/09 11:08:41.334408 00003393 SYN vgId:3, nodeId:3, status is sent, self:master:init:4, peer:slave:init:4, ack:0 tranId:5605 type:broadcast-rsp pfd:34
有谁知道如何解决这个问题?