Closed RobbanHoglund closed 2 years ago
The actual fix is here:
if (LeaderInitiator.this.getLock().isLockedByCurrentThread()) {
if (!this.leader) {
// Since we have the lock we need to ensure that the leader flag is set
this.leader = true;
}
Btw, Thanks for reviewing my code. :)
@RobbanHoglund ,
thank you very much for the contribution; looking forward for more!
BTW, we are in agreement to merge this Extensions project with main Spring Integration one: https://github.com/spring-projects/spring-integration-extensions/issues/254. So, if you wish to contribute more, feel free to migrate HZ module and upgrade it respectively to the latest deps and so!
Thanks for the good collaboration. And indeed I would gladly contribute if needed, especially with the Hazelcast parts.
I would gladly contribute if needed
Right, as I said: we need now to migrate HZ extension project to Spring Integration as a module. We did recently something similar for SMB one: https://github.com/spring-projects/spring-integration/pull/3791.
So, that's kinda the story we may consider as a contribution at the moment for HZ.
Thanks
Hi, I did an attempt here: https://github.com/spring-projects/spring-integration/pull/3812
I have tested this implementation/fix against a running HZ cluster (client/server mode) running version 5.1.1.
This will ensure that, if a HZ cluster is totally shut down and then restarted the leader state will be reset if the client still possess/regain the lock.