-
Notifications
You must be signed in to change notification settings - Fork 267
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
GH-259: Ensure lock state after HZ cluster shutdown #260
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, summarizing your change.
It looks like we need only to ensure that on every leader election we call cpSubSystem.getLock()
instead of that stored into the property.
The rest of your changes are somehow not relevant...
Thanks
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Outdated
Show resolved
Hide resolved
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Show resolved
Hide resolved
...ast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java
Outdated
Show resolved
Hide resolved
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Outdated
Show resolved
Hide resolved
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Show resolved
Hide resolved
The actual fix is here:
Btw, Thanks for reviewing my code. :) |
1644b96
to
a87fefd
Compare
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Outdated
Show resolved
Hide resolved
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Outdated
Show resolved
Hide resolved
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Outdated
Show resolved
Hide resolved
...azelcast/src/main/java/org/springframework/integration/hazelcast/leader/LeaderInitiator.java
Outdated
Show resolved
Hide resolved
...ast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java
Outdated
Show resolved
Hide resolved
ff68926
to
deca348
Compare
8371f86
to
d59f092
Compare
Merged as e11e65e. 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: #254. |
Thanks for the good collaboration. And indeed I would gladly contribute if needed, especially with the Hazelcast parts. |
Right, as I said: we need now to migrate HZ extension project to Spring Integration as a module. So, that's kinda the story we may consider as a contribution at the moment for HZ. Thanks |
Hi, |
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.