Skip to content
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

IMap.lock/unlock in HazelcastSessionManager #110

Open
borneolang opened this issue Jan 30, 2021 · 0 comments
Open

IMap.lock/unlock in HazelcastSessionManager #110

borneolang opened this issue Jan 30, 2021 · 0 comments

Comments

@borneolang
Copy link

borneolang commented Jan 30, 2021

For example, we have such code snippet in findSession:

sessionMap.lock(id);
try {
    sessionMap.remove(id);
    sessionMap.set(id, hazelcastSession);
} finally {
    sessionMap.unlock(id);
}

What happens if a lock holder dies between lock and unlock (orchestrator can execute kill -9 )? Maybe sessionMap.lock(..) with leaseTime would be better?

@borneolang borneolang changed the title IMap.lock/unlock pairs in HazelcastSessionManager IMap.lock/unlock in HazelcastSessionManager Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant