[GitHub] [zookeeper] tisonkun commented on a change in pull request #1832: ZOOKEEPER-XXXX: Merge readOnly field into Connect{Request|Response}

2022-02-28 Thread GitBox


tisonkun commented on a change in pull request #1832:
URL: https://github.com/apache/zookeeper/pull/1832#discussion_r816437386



##
File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java
##
@@ -62,13 +62,6 @@
 
 private Set authInfo = Collections.newSetFromMap(new 
ConcurrentHashMap());
 
-/**
- * If the client is of old version, we don't send r-o mode info to it.
- * The reason is that if we would, old C client doesn't read it, which
- * results in TCP RST packet, i.e. "connection reset by peer".
- */
-boolean isOldClient = true;

Review comment:
   Confirm work start from 3.4.0, not for 3.3.6 and before.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [zookeeper] tisonkun commented on a change in pull request #1832: ZOOKEEPER-XXXX: Merge readOnly field into Connect{Request|Response}

2022-02-28 Thread GitBox


tisonkun commented on a change in pull request #1832:
URL: https://github.com/apache/zookeeper/pull/1832#discussion_r816424802



##
File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java
##
@@ -62,13 +62,6 @@
 
 private Set authInfo = Collections.newSetFromMap(new 
ConcurrentHashMap());
 
-/**
- * If the client is of old version, we don't send r-o mode info to it.
- * The reason is that if we would, old C client doesn't read it, which
- * results in TCP RST packet, i.e. "connection reset by peer".
- */
-boolean isOldClient = true;

Review comment:
   This workaround is introduced at 
[ZOOKEEPER-784](https://issues.apache.org/jira/browse/ZOOKEEPER-784). And after 
3.4.0 both the server & the client handle `readOnly` field.
   
   However, as jute's `serialize` & `deserialize` implemented atomically (no 
optional field I think?), this PR should logically break client version less 
than 3.4 as documented here. I'll give it a test and wonder what the version 
policy and compatibility promise we should keep.
   
   cc @eolivelli @phunt 




-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [zookeeper] tisonkun commented on a change in pull request #1832: ZOOKEEPER-XXXX: Merge readOnly field into Connect{Request|Response}

2022-02-28 Thread GitBox


tisonkun commented on a change in pull request #1832:
URL: https://github.com/apache/zookeeper/pull/1832#discussion_r816424802



##
File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java
##
@@ -62,13 +62,6 @@
 
 private Set authInfo = Collections.newSetFromMap(new 
ConcurrentHashMap());
 
-/**
- * If the client is of old version, we don't send r-o mode info to it.
- * The reason is that if we would, old C client doesn't read it, which
- * results in TCP RST packet, i.e. "connection reset by peer".
- */
-boolean isOldClient = true;

Review comment:
   This workaround is introduced at 
[ZOOKEEPER-784](https://issues.apache.org/jira/browse/ZOOKEEPER-784). And after 
3.4.0 both the server & the client handle `readOnly` field.
   
   However, as jute's `serialize` & `deserialize` implemented atomically, this 
PR should logically break client version less than 3.4 as documented here. I'll 
give it a test and wonder what the version policy and compatibility promise we 
should keep.
   
   cc @eolivelli @phunt 




-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [zookeeper] tisonkun commented on a change in pull request #1832: ZOOKEEPER-XXXX: Merge readOnly field into Connect{Request|Response}

2022-02-28 Thread GitBox


tisonkun commented on a change in pull request #1832:
URL: https://github.com/apache/zookeeper/pull/1832#discussion_r816424802



##
File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/ServerCnxn.java
##
@@ -62,13 +62,6 @@
 
 private Set authInfo = Collections.newSetFromMap(new 
ConcurrentHashMap());
 
-/**
- * If the client is of old version, we don't send r-o mode info to it.
- * The reason is that if we would, old C client doesn't read it, which
- * results in TCP RST packet, i.e. "connection reset by peer".
- */
-boolean isOldClient = true;

Review comment:
   This workaround is introduced at 
[ZOOKEEPER-784](https://issues.apache.org/jira/browse/ZOOKEEPER-784). And after 
3.4.0 both the server & the client handle `readOnly` field.
   
   However, as jute's `serialize` & `deserialize` implemented atomically, this 
PR should be logically break client version less than 3.4 as documented here. 
I'll give it a test and wonder what the version policy and compatibility 
promise we should keep.
   
   cc @eolivelli @phunt 




-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org