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

请教创建7个以上节点选举出错 #92

Open
Finshao opened this issue Dec 25, 2024 · 1 comment
Open

请教创建7个以上节点选举出错 #92

Finshao opened this issue Dec 25, 2024 · 1 comment

Comments

@Finshao
Copy link

Finshao commented Dec 25, 2024

源代码测试多节点情况发现节点数超过7个就会卡在选举阶段,请问我是不是那个步骤出现了疏漏?
我的步骤:provide consumer均未改动,未开启KV, 输入 ./raftCoreRun -n 3 -f test.conf没问题,换成 ./raftCoreRun -n 7 -f test.conf就会一直卡在选举
具体输出:
./raftCoreRun -n 3 -f test.conf:
屏幕截图 2024-12-25 142839
./raftCoreRun -n 7 -f test.conf:
222
比较(3)情况这里还没连接完全结束就开始[scheduler] scheduler start
`lsx@Lsx:/home/Raft/KVstorageBaseRaft-cpp-main/bin$ ./raftCoreRun -n 7 -f test.conf
test.conf 已清空
start to create raftkv node:0 port:11442 pid:23437
raftServer node:0 start to sleep to wait all ohter raftnode start!!!!
service_name:kvServerRpc
service_name:raftRpc
RpcProvider start service at ip:127.0.1.1 port:11442
start to create raftkv node:1 port:11443 pid:23437
raftServer node:1 start to sleep to wait all ohter raftnode start!!!!
service_name:kvServerRpc
service_name:raftRpc
RpcProvider start service at ip:127.0.1.1 port:11443
start to create raftkv node:2 port:11444 pid:23437
raftServer node:2 start to sleep to wait all ohter raftnode start!!!!
service_name:kvServerRpc
service_name:raftRpc
RpcProvider start service at ip:127.0.1.1 port:11444
start to create raftkv node:3 port:11445 pid:23437
raftServer node:3 start to sleep to wait all ohter raftnode start!!!!
service_name:kvServerRpc
service_name:raftRpc
RpcProvider start service at ip:127.0.1.1 port:11445
start to create raftkv node:4 port:11446 pid:23437
raftServer node:4 start to sleep to wait all ohter raftnode start!!!!
service_name:kvServerRpc
service_name:raftRpc
RpcProvider start service at ip:127.0.1.1 port:11446
start to create raftkv node:5 port:11447 pid:23437
raftServer node:5 start to sleep to wait all ohter raftnode start!!!!
service_name:kvServerRpc
service_name:raftRpc
RpcProvider start service at ip:127.0.1.1 port:11447
raftServer node:0 wake up!!!! start to connect other raftnode
node0 连接node1success!
node0 连接node2success!
20241225 06:31:53.375157Z 23454 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11443#1] from 127.0.0.1:56763 - TcpServer.cc:80
node0 连接node3success!
20241225 06:31:53.375443Z 23469 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11444#1] from 127.0.0.1:56764 - TcpServer.cc:80
20241225 06:31:53.375568Z 23482 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11445#1] from 127.0.0.1:56765 - TcpServer.cc:80
node0 连接node4success!
20241225 06:31:53.375744Z 23491 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11446#1] from 127.0.0.1:56766 - TcpServer.cc:80
node0 连接node5success!
20241225 06:31:53.375865Z 23506 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11447#1] from 127.0.0.1:56767 - TcpServer.cc:80
start to create raftkv node:6 port:11448 pid:23437
raftServer node:6 start to sleep to wait all ohter raftnode start!!!!
service_name:kvServerRpc
service_name:raftRpc
RpcProvider start service at ip:127.0.1.1 port:11448
raftServer node:1 wake up!!!! start to connect other raftnode
node1 连接node0success!
node1 连接node2success!
20241225 06:31:54.419079Z 23439 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11442#1] from 127.0.0.1:56773 - TcpServer.cc:80
20241225 06:31:54.419215Z 23469 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11444#2] from 127.0.0.1:56774 - TcpServer.cc:80
node1 连接node3success!
20241225 06:31:54.419363Z 23482 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11445#2] from 127.0.0.1:56775 - TcpServer.cc:80
node1 连接node4success!
20241225 06:31:54.419520Z 23491 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11446#2] from 127.0.0.1:56776 - TcpServer.cc:80
node1 连接node5success!
20241225 06:31:54.419694Z 23506 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11447#2] from 127.0.0.1:56777 - TcpServer.cc:80
node1 连接node6success!
20241225 06:31:54.419871Z 23521 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11448#1] from 127.0.0.1:56778 - TcpServer.cc:80
raftServer node:2 wake up!!!! start to connect other raftnode
node2 连接node0success!
20241225 06:31:55.460855Z 23439 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11442#2] from 127.0.0.1:56782 - TcpServer.cc:80
node2 连接node1success!
20241225 06:31:55.461084Z 23454 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11443#2] from 127.0.0.1:56783 - TcpServer.cc:80
node2 连接node3success!
20241225 06:31:55.461280Z 23482 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11445#3] from 127.0.0.1:56784 - TcpServer.cc:80
node2 连接node4success!
20241225 06:31:55.461415Z 23491 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11446#3] from 127.0.0.1:56785 - TcpServer.cc:80
node2 连接node5success!
20241225 06:31:55.461586Z 23506 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11447#3] from 127.0.0.1:56786 - TcpServer.cc:80
node2 连接node6success!
20241225 06:31:55.461735Z 23521 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11448#2] from 127.0.0.1:56787 - TcpServer.cc:80
raftServer node:3 wake up!!!! start to connect other raftnode
node3 连接node0success!
20241225 06:31:56.502565Z 23439 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11442#3] from 127.0.0.1:56795 - TcpServer.cc:80
node3 连接node1success!
20241225 06:31:56.502738Z 23454 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11443#3] from 127.0.0.1:56796 - TcpServer.cc:80
node3 连接node2success!
20241225 06:31:56.502904Z 23469 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11444#3] from 127.0.0.1:56797 - TcpServer.cc:80
node3 连接node4success!
20241225 06:31:56.503051Z 23491 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11446#4] from 127.0.0.1:56798 - TcpServer.cc:80
node3 连接node5success!
20241225 06:31:56.503183Z 23506 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11447#4] from 127.0.0.1:56799 - TcpServer.cc:80
node3 连接node6success!
20241225 06:31:56.503306Z 23521 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11448#3] from 127.0.0.1:56800 - TcpServer.cc:80
raftServer node:4 wake up!!!! start to connect other raftnode
node4 连接node0success!
20241225 06:31:57.546628Z 23439 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11442#4] from 127.0.0.1:56803 - TcpServer.cc:80
node4 连接node1success!
20241225 06:31:57.546990Z 23454 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11443#4] from 127.0.0.1:56804 - TcpServer.cc:80
node4 连接node2success!
20241225 06:31:57.547310Z 23469 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11444#4] from 127.0.0.1:56805 - TcpServer.cc:80
node4 连接node3success!
20241225 06:31:57.547719Z 23482 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11445#4] from 127.0.0.1:56806 - TcpServer.cc:80
node4 连接node5success!
20241225 06:31:57.547976Z 23506 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11447#5] from 127.0.0.1:56807 - TcpServer.cc:80
node4 连接node6success!
20241225 06:31:57.548090Z 23521 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11448#4] from 127.0.0.1:56808 - TcpServer.cc:80
raftServer node:5 wake up!!!! start to connect other raftnode
node5 连接node0success!
20241225 06:31:58.588878Z 23439 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11442#5] from 127.0.0.1:56812 - TcpServer.cc:80
node5 连接node1success!
20241225 06:31:58.589008Z 23454 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11443#5] from 127.0.0.1:56813 - TcpServer.cc:80
node5 连接node2success!
20241225 06:31:58.589177Z 23469 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11444#5] from 127.0.0.1:56814 - TcpServer.cc:80
node5 连接node3success!
20241225 06:31:58.589305Z 23482 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11445#5] from 127.0.0.1:56815 - TcpServer.cc:80
node5 连接node4success!
20241225 06:31:58.589390Z 23491 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11446#5] from 127.0.0.1:56816 - TcpServer.cc:80
node5 连接node6success!
20241225 06:31:58.589512Z 23521 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11448#5] from 127.0.0.1:56817 - TcpServer.cc:80
[2024-12-25-14-31-59] [Init&ReInit] Sever 0, term 0, lastSnapshotIncludeIndex {0} , lastSnapshotIncludeTerm {0}
-------scheduler init success-------
[scheduler] scheduler start
[scheduler] begin run
[fiber] create fiber , id = 0
raftServer node:6 wake up!!!! start to connect other raftnode
node6 连接node0success!
20241225 06:31:59.630489Z 23439 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11442#6] from 127.0.0.1:56818 - TcpServer.cc:80
node6 连接node1success!
20241225 06:31:59.630682Z 23454 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11443#6] from 127.0.0.1:56819 - TcpServer.cc:80
node6 连接node2success!
20241225 06:31:59.630851Z 23469 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11444#6] from 127.0.0.1:56820 - TcpServer.cc:80
node6 连接node3success!
20241225 06:31:59.631047Z 23482 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11445#6] from 127.0.0.1:56821 - TcpServer.cc:80
node6 连接node4success!
20241225 06:31:59.631166Z 23491 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11446#6] from 127.0.0.1:56822 - TcpServer.cc:80
node6 连接node5success!
20241225 06:31:59.631314Z 23506 INFO TcpServer::newConnection [RpcProvider] - new connection [RpcProvider-127.0.1.1:11447#6] from 127.0.0.1:56823 - TcpServer.cc:80
[2024-12-25-14-32-0] [Init&ReInit] Sever 1, term 0, lastSnapshotIncludeIndex {0} , lastSnapshotIncludeTerm {0}
-------scheduler init success-------
[scheduler] scheduler start
[scheduler] begin run
[fiber] create fiber , id = 0
electionTimeOutTicker();函数设置睡眠时间为: 1052 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1052.52 毫秒
[2024-12-25-14-32-0] [ ticker-func-rf(0) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 开始
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 开始
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 开始
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 开始
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 开始
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 完毕,耗时:{0} ms
20241225 06:32:00.432028Z 23439 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11442#2 - TcpServer.cc:109
20241225 06:32:00.432048Z 23439 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11442#3 - TcpServer.cc:109
20241225 06:32:00.432060Z 23454 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11443#2 - TcpServer.cc:109
20241225 06:32:00.432079Z 23454 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11443#3 - TcpServer.cc:109
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 完毕,耗时:{0} ms
20241225 06:32:00.432188Z 23521 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11448#3 - TcpServer.cc:109
20241225 06:32:00.432221Z 23521 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11448#2 - TcpServer.cc:109
20241225 06:32:00.432257Z 23439 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11442#4 - TcpServer.cc:109
20241225 06:32:00.432325Z 23454 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11443#4 - TcpServer.cc:109
[2024-12-25-14-32-0] [func-sendRequestVote rf{0}] 向server{1} 发送 RequestVote 完毕,耗时:{0} ms
20241225 06:32:00.432341Z 23521 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11448#4 - TcpServer.cc:109
20241225 06:32:00.432445Z 23454 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11443#5 - TcpServer.cc:109
20241225 06:32:00.432450Z 23439 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11442#5 - TcpServer.cc:109
20241225 06:32:00.432489Z 23521 INFO TcpServer::removeConnectionInLoop [RpcProvider] - connection RpcProvider-127.0.1.1:11448#5 - TcpServer.cc:109
[2024-12-25-14-32-0] [Init&ReInit] Sever 6, term 0, lastSnapshotIncludeIndex {0} , lastSnapshotIncludeTerm {0}
-------scheduler init success-------
[scheduler] scheduler start
[scheduler] begin run
[fiber] create fiber , id = 0
electionTimeOutTicker();函数设置睡眠时间为: 1085 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1085.11 毫秒
[2024-12-25-14-32-1] [ ticker-func-rf(1) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 开始
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 开始
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 开始
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 开始
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 开始
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 开始
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-1] [func-sendRequestVote rf{1}] 向server{2} 发送 RequestVote 完毕,耗时:{0} ms
electionTimeOutTicker();函数设置睡眠时间为: 1134 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1134.59 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 1147 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1146.38 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 780 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 780.215 毫秒
[2024-12-25-14-32-2] [ ticker-func-rf(6) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 开始
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 开始
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 开始
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 开始
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 开始
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 开始
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-2] [func-sendRequestVote rf{6}] 向server{3} 发送 RequestVote 完毕,耗时:{0} ms
electionTimeOutTicker();函数设置睡眠时间为: 1099 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1099.59 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 1050 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1050.8 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 1048 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1048.15 毫秒
[2024-12-25-14-32-3] [ ticker-func-rf(0) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{0}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
electionTimeOutTicker();函数设置睡眠时间为: 1132 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1133.46 毫秒
[2024-12-25-14-32-3] [ ticker-func-rf(6) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 开始
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-3] [func-sendRequestVote rf{6}] 向server{4} 发送 RequestVote 完毕,耗时:{0} ms
electionTimeOutTicker();函数设置睡眠时间为: 1090 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1090.23 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 1016 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1016.63 毫秒
[2024-12-25-14-32-4] [ ticker-func-rf(1) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 开始
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 开始
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 开始
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 开始
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 开始
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 开始
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-4] [func-sendRequestVote rf{1}] 向server{5} 发送 RequestVote 完毕,耗时:{0} ms
electionTimeOutTicker();函数设置睡眠时间为: 1062 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1061.68 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 1143 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1144.04 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 963 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 963.852 毫秒
[2024-12-25-14-32-5] [ ticker-func-rf(6) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 开始
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 开始
尝试重新连接,对方ip:127.0.1.1 对方端口11444
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 开始
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 开始
尝试重新连接,对方ip:127.0.1.1 对方端口11445
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 开始
尝试重新连接,对方ip:127.0.1.1 对方端口11446
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 开始
尝试重新连接,对方ip:127.0.1.1 对方端口11447
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-5] [func-sendRequestVote rf{6}] 向server{6} 发送 RequestVote 完毕,耗时:{0} ms
electionTimeOutTicker();函数设置睡眠时间为: 1103 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1103.49 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 1185 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1185.99 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 948 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 949.153 毫秒
[2024-12-25-14-32-6] [ ticker-func-rf(0) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{0}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
electionTimeOutTicker();函数设置睡眠时间为: 1089 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1089.84 毫秒
electionTimeOutTicker();函数设置睡眠时间为: 1190 毫秒
electionTimeOutTicker();函数实际睡眠时间为: 1190.15 毫秒
[2024-12-25-14-32-6] [ ticker-func-rf(6) ] 选举定时器到期且不是leader,开始选举

[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 开始
[2024-12-25-14-32-6] [func-MprpcChannel::CallMethod]重连接ip:{127.0.1.1} port{11444}失败
[2024-12-25-14-32-6] [func-MprpcChannel::CallMethod]重连接ip:{127.0.1.1} port{11445}失败
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-MprpcChannel::CallMethod]重连接ip:{127.0.1.1} port{11447}失败
[2024-12-25-14-32-6] [func-MprpcChannel::CallMethod]重连接ip:{127.0.1.1} port{11446}失败
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
[2024-12-25-14-32-6] [func-sendRequestVote rf{6}] 向server{7} 发送 RequestVote 完毕,耗时:{0} ms
^C`

这是具体输出情况,请问该怎么做,感谢!!!。

Copy link

Message that will be displayed on users' first issue

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

1 participant