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
Accept raft role listeners at raft partition server #987
Conversation
693456a
to
4ad7290
Compare
4ad7290
to
982c843
Compare
Hey @johnou, thanks for approving this PR. I rebased to master and fixed the latest checkstyle errors in the tests. |
protocols/raft/src/main/java/io/atomix/protocols/raft/partition/RaftPartition.java
Outdated
Show resolved
Hide resolved
Anything else? 🙂 |
My fat fingers posted a partial comment... I think this is a good first step to fulfilling the feature request in #945. The I need to take a closer look at this in the morning. Maybe we can add a generic |
Agree. This PR was the easiest way for me to implement, since I was also not sure if is necessary on the other implementations (like primary backup).
Yes would be nice if we can have that. Greets |
How should we go about it? I can add the necessary interfaces and then we can just update this PR to implement them. Does that make sense? |
Yes why not 🙂 👍 |
Okay should be good to go. Just need to additionally implement |
92c0aa4
to
01775b0
Compare
Ok rebased the branch. Locally I tested it with impl the |
Hmm... that's a good question let me look at it |
I just realized something, though. Really it seems the Maybe in the case of |
Ah thanks have overseen that.
So we will leave the PR as it is? |
Hey @kuujo what do you think? Can we merge this? Or should I improve anything else? Greets, |
@kuujo poke |
Hey guys, any news on this? |
This feature allows the user to add raft role change listeners to the RaftPartitionGroup.
Would be nice if we could have that, we have the use case where we need to know who is the leader and listen for then role changes (whether we becoming the leader or step down). We want to start processing on leader nodes and stop the processing on followers.