Skip to content

Raft deadlock during member removal #1379

Closed Answered by drmingdrmer
sebadob asked this question in Q&A
Discussion options

You must be logged in to vote

I noticed there is a blocking send in the drop method:
https://github.com/sebadob/hiqlite/blob/60337939de8bde26ab09c06a3f43122b735fdb80/hiqlite/src/network/raft_client.rs#L511-L518

It blocks when node-3 re-join the cluster. The reason it blocks may be because the receiving end has destroyed or else.

Change it to try_send(), a non-blocking mode send, it seems node-3 can smoothly re-join the cluster.

impl Drop for NetworkConnectionStreaming {
    fn drop(&mut self) {
        let _ = self.sender.try_send(RaftRequest::Shutdown);
        if let Some(task) = self.task.take() {
            task.abort();
        }
    }
}

I tried update the channel buffer size from 1 to 100 but it does not chan…

Replies: 7 comments 25 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sebadob
Comment options

Comment options

You must be logged in to vote
16 replies
@drmingdrmer
Comment options

@drmingdrmer
Comment options

@sebadob
Comment options

@drmingdrmer
Comment options

@sebadob
Comment options

Comment options

You must be logged in to vote
3 replies
@sebadob
Comment options

@sebadob
Comment options

@sebadob
Comment options

Comment options

You must be logged in to vote
2 replies
@sebadob
Comment options

@sebadob
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@sebadob
Comment options

@drmingdrmer
Comment options

@sebadob
Comment options

Answer selected by sebadob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants