OpenAtomFoundation / pikiwidb

a high-performance, large-capacity, multi-tenant, data-persistent, strong data consistency based on raft, Redis-compatible elastic KV data storage system based on RocksDB
BSD 3-Clause "New" or "Revised" License
195 stars 62 forks source link

Raft pre vote 的时候,突然崩溃 #420

Open luky116 opened 1 month ago

luky116 commented 1 month ago

Is this a regression?

Yes

Description

I0815 16:52:16.666848 12547 /Users/sanyue/code/qihoo/pikiwidb2/src/praft/praft.cc:741] Node start following { leader_id=127.0.0.1:7231:0:0, term=2, status=Follower/Learner receives message from new leader with the same term.} W0815 16:52:16.667021 13571 /Users/sanyue/code/qihoo/pikiwidb2/build-debug/Source/extern_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:278] Fail to write into Socket{id=93 fd=209 addr=127.0.0.1:51211:8231} (0x1401a8000): Got EOF I0815 16:52:16.667133 12035 /Users/sanyue/code/qihoo/pikiwidb2/build-debug/Source/extern_braft/src/braft/node.cpp:2321] node pikiwidb:127.0.0.1:8231:0 received PreVote from 127.0.0.1:7231:0:0 in term 3 current_term 2 granted 0 rejected_by_lease 1 W0815 16:52:16.667153 12035 /Users/sanyue/code/qihoo/pikiwidb2/build-debug/Source/extern_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:278] Fail to write into Socket{id=186 fd=219 addr=127.0.0.1:51237:8231} (0x150028000): Got EOF I0815 16:52:16.667120 12547 /Users/sanyue/code/qihoo/pikiwidb2/build-debug/Source/extern_braft/src/braft/node.cpp:2321] node pikiwidb:127.0.0.1:8231:0 received PreVote from 127.0.0.1:7231:0:0 in term I0815 16:52:16.667207 12803 /Users/sanyue/code/qihoo/pikiwidb2/build-debug/Source/extern_braft/src/braft/node.cpp:2321] node pikiwidb:127.0.0.1:8231:0:0 received PreVote from 127.0.0.1:7231:0:0 in term 3 current_term 2 granted 0 rejected_by_lease 1 I0815 16:52:16.667176 12035 /Users/sanyue/code/qihoo/pikiwidb2/build-debug/Source/extern_braft/src/braft/node.cpp:2321] node pikiwidb: Exception: EXC_BAD_ACCESS (code=1, address=0x11) Exception: EXC_BAD_ACCESS (code=1, address=0xeae0c0474800)

image

Please provide a link to a minimal reproduction of the bug

No response

Screenshots or videos

images

Please provide the version you discovered this bug in (check about page for version information)

No response

Anything else?

No response

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


Title: Raft crashed suddenly when pre vote

Issues-translate-bot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


When pre-vote, manually pause the node node and manually create a delay. This error will occur. brpc officially gave the reason for this error. Q: Fail to write into fd=1865 SocketId=8905@10.208.245.43:54742@8230: What does Got EOF mean? A: Generally, the client uses a connection pool or short connection mode, and the connection will be closed after the RPC times out. When the server writes back the response, it finds that the connection has been closed and reports this error. > Got EOF means that EOF has been received before (the peer has closed the connection normally). When the client side uses single connection mode, the server side will generally not report this.