Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/119#discussion_r91666647
  
    --- Diff: src/java/main/org/apache/zookeeper/ClientCnxn.java ---
    @@ -1495,10 +1504,21 @@ public ReplyHeader submitRequest(RequestHeader h, 
Record request,
             Packet packet = queuePacket(h, r, request, response, null, null, 
null,
                     null, watchRegistration, watchDeregistration);
             synchronized (packet) {
    +            long waitStartTime = System.currentTimeMillis();
                 while (!packet.finished) {
    -                packet.wait();
    +                packet.wait(requestTimeout);
    --- End diff --
    
    This unconditionally adds a timeout is a pretty significant semantic 
change. Whether or not we should wait indefinitely is a separate issue to 
discuss later, but from a compatibility point of view we'd at least provide a 
configuration option to let user opt in this feature rather than having this 
turned on by default. So by default there is no timeout and client still waits 
indefinitely, user who wants to opt in to turn on the timeout needs to explicit 
say so and provide a value they think make sense to them. Otherwise, we'd have 
to solve the problem of what the default timeout value we should set in ZK 
config if this feature is turned on by default, and that problem is hard and 
very likely there is no default value that makes everyone happy.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to