-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value #1257
Conversation
|
@maoling I added a commit to instruct SpotBugs that we know what we're doing, following the approach used to allow |
looks good. I still have another thought(no binding for the following, you can ignore it):
Haha, I also test for the
|
Thanks for the review @maoling! Synchronizing on In terms of future extensibility I don't think this is a concern as And yes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM +1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM +1
Can you please revase this patch into latest master? |
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable.
@eolivelli rebase done. The |
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes #1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520) Signed-off-by: Mohammad Arshad <arshad@apache.org>
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes #1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520) Signed-off-by: Mohammad Arshad <arshad@apache.org>
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes #1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520) Signed-off-by: Mohammad Arshad <arshad@apache.org>
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520)
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvainbluxte.net> Reviewers: maoling <maolingapache.org>, Mohammad Arshad <arshadapache.org> Closes #1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520) Author: Sylvain Wallez <sylvain@bluxte.net> Author: Mate Szalay-Beko <symat@apache.org> Reviewers: Sylvain Wallez <sylvain@bluxte.net>, Mohammad Arshad <arshad@apache.org>, maoling <maoling@apache.org> Closes #1850 from symat/ZOOKEEPER-3652-branch-3.5 and squashes the following commits: 5cd29db [Mate Szalay-Beko] remove formatting changes e925265 [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value
…le internal value (#23) When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value Co-authored-by: Sylvain Wallez <sylvain@bluxte.net>
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value
…le internal value (#49) When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value Co-authored-by: Sylvain Wallez <sylvain@bluxte.net>
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value
…le internal value (#16) When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value Co-authored-by: Sylvain Wallez <sylvain@bluxte.net>
The When |
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520) Signed-off-by: Mohammad Arshad <arshad@apache.org>
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvain@bluxte.net> Reviewers: maoling <maoling@apache.org>, Mohammad Arshad <arshad@apache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520) Signed-off-by: Mohammad Arshad <arshad@apache.org>
…le internal value When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss. Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients. We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable. Author: Sylvain Wallez <sylvainbluxte.net> Reviewers: maoling <maolingapache.org>, Mohammad Arshad <arshadapache.org> Closes apache#1257 from swallez/ZOOKEEPER-3652 and squashes the following commits: 82e2cad [Sylvain Wallez] Instruct SpotBugs that we know what we're doing when synchronizing on outgoingQueue b0bc03d [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 91e0520) Author: Sylvain Wallez <sylvain@bluxte.net> Author: Mate Szalay-Beko <symat@apache.org> Reviewers: Sylvain Wallez <sylvain@bluxte.net>, Mohammad Arshad <arshad@apache.org>, maoling <maoling@apache.org> Closes apache#1850 from symat/ZOOKEEPER-3652-branch-3.5 and squashes the following commits: 5cd29db [Mate Szalay-Beko] remove formatting changes e925265 [Sylvain Wallez] ZOOKEEPER-3652: Synchronize ClientCnxn outgoing queue flush on a stable internal value (cherry picked from commit 2610a19) Change-Id: Ib6317fd320e6eedfdaecd0db2e073cb2c92c9752
When packets are added to ClientCnxn's outgoing packet queue we ensure there's no conflict with an ongoing flush of that queue because of connection loss.
Synchronization used to be on the state field's value. This value is both not stable (its value changes over time), possibly causing improper synchronization, and global, which can cause contention in applications that run several ZooKeeper clients.
We now synchronize on outgoingQueue which is both local to a ClientCnxn's instance and stable.