You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/03/02 03:40:55 UTC
[GitHub] [zookeeper] maoling commented on issue #1257: ZOOKEEPER-3652:
Synchronize ClientCnxn outgoing queue flush on a stable internal value
maoling commented on issue #1257: ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value
URL: https://github.com/apache/zookeeper/pull/1257#issuecomment-593204387
looks good. I still have another thought(no binding for the following, you can ignore it):
- Since the root cause is a narrow windows between `queuePacket` and `cleanup`, so synchronized `objectLock` is also an alternative way? which one is better? Since `outgoingQueue` is a critical Queue for client to talk with server, synchronized `outgoingQueue` will have performance and future program extensibility issue?
Haha, I also test for the global and inner wording by the following way:
- new two different zookeeper clients, create some znodes, printing the hashcode of `outgoingQueue` and `state`. They really hold different `outgoingQueue`, but the same `state`.
- synchronized `Enum` is also not thread-safe
- In a word, `Enum` is a heresy:)
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services