kezhuw commented on code in PR #2168:
URL: https://github.com/apache/zookeeper/pull/2168#discussion_r1618260183
##########
zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java:
##########
@@ -1525,37 +1591,13 @@ public ReplyHeader submitRequest(
watchRegistration,
watchDeregistration);
synchronized (packet) {
- if (requestTimeout > 0) {
- // Wait for request completion with timeout
- waitForPacketFinish(r, packet);
- } else {
- // Wait for request completion infinitely
- while (!packet.finished) {
- packet.wait();
- }
+ while (!packet.finished) {
+ packet.wait();
}
}
- if (r.getErr() == Code.REQUESTTIMEOUT.intValue()) {
Review Comment:
This does not guarantee `Code.REQUESTTIMEOUT` in returning as
`sendThread.cleanAndNotifyState()` will reset `r.err` to `Code.CONNECTIONLOSS`.
The old testing code is cheating us as it modified client side behavior.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]