0

我使用 2.0.20.12 TDengine 在 ubuntu 18.4 上构建了一个具有两个节点(节点 c1 和 c2)的引擎集群。因为我需要做一个情景模拟,如果有一些节点崩溃,我会将这些节点从集群中删除。因此,创建一个包含 2 个副本的数据库 t1,然后将一些数据导入 db t2。然后我杀死服务器 c2:6030。一切都准备好了。我开始删除节点 c2

drop dnode "c2:6030";

然后我遇到了一个错误“DB错误:DNodes”。我认为这是因为复制品。所以我将db的副本号设置为1。

 ALTER DATABASE syslogmd REPLICA 1

然后是尝试删除节点 c2 并成功。但是,当我使用命令检查节点状态时

show dnodes;

如果发现节点 c2 处于丢弃状态。它没有消失。

>  id   |           end_point            | vnodes | cores  |   status   | role  |       create_time       |      offline reason      |

> ======================================================================================================================================
>       1 | c1:6030                        |      2 |      4 | ready      | any   | 2021-08-19 07:22:56.887 |                          |
>       3 | c2:6030                        |      1 |      4 | dropping   | any   | 2021-08-19 08:45:27.160 | status not received      |
>       0 | arbitrator:6030                |      0 |      0 | offline    | arb   | 2021-08-19 11:08:10.483 | -
                  |

我检查了taoslog,发现那里有一些错误。

08/19 11:08:40.717213 00003393 SYN vgId:2, nodeId:0, TCP 链接自成功后断开,pfd:40 sfd:-1 08/19 11:08:40.717218 00003393 SYN vgId:2, nodeId:0,重新启动对等连接,最后 sstatus:init 08/19 11:08:40.717222 00003393 SYN vgId:2, nodeId:0, pfd:-1 sfd:-1 将关闭 08/19 11:08:40.717226 00003393 SYN vgId:2 , nodeId:0, peer conn is restart and set sstatus:init 08/19 11:08:40.717229 00003393 SYN vgId:2, nodeId:0, check peer connection in 1000 ms 08/19 11:08:40.717235 00003393 SYN vgId: 2、nodeId:0, peer role:unsynced change to offline 08/19 11:08:40.717239 00003393 SYN vgId:2, peer:vgId:2, nodeId:1 is master, index:0 08/19 11:08:40.717242 00003393 SYN vgId:2,nodeId:1,它是master,replica:1 sver:787 08/19 11:08:40.717246 00003393 SYN vgId:2,角色改变,广播状态,replica:1 08/19 11:08 :40。717252 00003393 SYN 0x7f3450365720 fd:40 从 epoll 线程中删除,num:1 08/19 11:08:41.071643 00003374 MND vgId:3,replica:1 numOfVnodes:2,尝试删除一个 vnode 08/19 11:08:41.374216 MND vgId:3,replica:1 numOfVnodes:2,尝试删除一个vnode 08/19 11:08:41.334033 00003394 SYN vgId:1,nodeId:3,收到状态,self:master:init:35,peer:slave: 35, ack:1 tranId:48947 type:broadcast pfd:31 08/19 11:08:41.334053 00003394 SYN vgId:1, nodeId:3, peer role:slave change to slave 08/19 11:08:41.334058 00003394 SYN vgId :1, peer:vgId:1, nodeId:1 是master, index:0 08/19 11:08:41.334063 00003394 SYN vgId:1, nodeId:1, 它是master, replica:2 sver:35 08/19 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 /19 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/19 11:08:41.334326 00003393 SYN vgId:3, nodeId: 3、peer角色:slave变为slave 08/19 11:08:41.334331 00003393 SYN vgId:3, peer:vgId:3, nodeId:1 is master, index:1 08/19 11:08:41.334336 00003393 SYN vgId: 3、nodeId:1,是master,replica:2 sver:4 08/19 11:08:41.334408 00003393 SYN vgId:3,nodeId:3,状态发送,self:master:init:4,peer:slave :init:4, ack:0 tranId:5605 类型:broadcast-rsp pfd:34副本:2 sver:4 08/19 11:08:41.334408 00003393 SYN vgId:3,nodeId:3,状态已发送,self:master:init:4, peer:slave:init:4, ack:0 tranId:5605类型:广播-rsp pfd:34副本:2 sver:4 08/19 11:08:41.334408 00003393 SYN vgId:3,nodeId:3,状态已发送,self:master:init:4, peer:slave:init:4, ack:0 tranId:5605类型:广播-rsp pfd:34

我想问一下drop tdengine集群的dnodes有什么误解吗?

4

0 回答 0