kaisun2000 commented on a change in pull request #1066:
URL: https://github.com/apache/helix/pull/1066#discussion_r445250464
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
##########
@@ -2119,8 +2126,41 @@ private String getHexSessionId() {
* 2. create mode is EPHEMERAL or EPHEMERAL_SEQUENTIAL
*/
private boolean isSessionAwareOperation(String expectedSessionId, CreateMode
mode) {
- return expectedSessionId != null && !expectedSessionId.isEmpty() && (
- mode == CreateMode.EPHEMERAL || mode ==
CreateMode.EPHEMERAL_SEQUENTIAL);
+ return expectedSessionId != null && !expectedSessionId.isEmpty() &&
mode.isEphemeral();
+ }
+
+ private ZooKeeper getExpectedZookeeper(final String expectedSessionId) {
Review comment:
So here, we are saying the native Zookeeper object `zookeeper` can't be
changed even session changed. Still one Zookeeeper object one session
invariant, right? Save us one lock.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]