From 50b17605f1151f1eac5e66096dc51fd340d3c7a6 Mon Sep 17 00:00:00 2001 From: "vince.wu" <451943+kikimo@users.noreply.github.com> Date: Wed, 20 Oct 2021 19:05:43 +0800 Subject: [PATCH] fix raft appendlog deadlock (#3141) Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> --- src/kvstore/raftex/RaftPart.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kvstore/raftex/RaftPart.cpp b/src/kvstore/raftex/RaftPart.cpp index 5228d6dbd7a..f98e1978994 100644 --- a/src/kvstore/raftex/RaftPart.cpp +++ b/src/kvstore/raftex/RaftPart.cpp @@ -1865,9 +1865,9 @@ bool RaftPart::checkAppendLogResult(AppendLogResult res) { cachingPromise_.setValue(res); cachingPromise_.reset(); bufferOverFlow_ = false; + sendingPromise_.setValue(res); + replicatingLogs_ = false; } - sendingPromise_.setValue(res); - replicatingLogs_ = false; return false; } return true;