-
Notifications
You must be signed in to change notification settings - Fork 74
CP Subsystem - Semaphore #227
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
Conversation
9581800 to
155d7bf
Compare
Implementation, tests, documentation and code samples for both the session aware and sessionless semaphore proxies are added. Also, another test dependency to parameterize tests is added.
155d7bf to
e188f3f
Compare
hazelcast/proxy/cp/semaphore.py
Outdated
| "from the same thread." % self._object_name) | ||
| raise error | ||
| except Exception as e: | ||
| self._release_session(session_id) |
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.
I don't see this release session logic in Java client's SessionAwareSemaphoreProxy. Is it a leftover? If so, it makes sense to submit a PR to fix it in Java client and apply the change to other clients as well.
The same question applies to other methods with except Exception as e clause, like _do_drain.
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.
These are not leftovers, I forgot to send a PR to the Java side. I will do that and share the links within the team channel so that it can be applied to other clients. I also found that I was removing only 1 permit in case of an unspecified error on _do_acquire. Also fixed that and updated the test
puzpuzpuz
left a comment
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.
LGTM
Implementation, tests, documentation and code samples for both the
session aware and sessionless semaphore proxies are added.
Also, another test dependency to parameterize tests is added.