-
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-4537: Race between SyncThread and CommitProcessor thread #1877
Conversation
Good catch. |
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.
thanks @jithin23 for your PR! Looks good. I retriggered the CI (most probably we just had some flaky tests)
@eolivelli thanks for checking! We had some discussions and a bit more background on the Jira ticket.
I think this race bug was introduced by ZOOKEEPER-2024 in 3.6.0, it would be important to cherrypick this to branch-3.6, branch-3.7, and branch-3.8 too. |
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
@symat can you please merge to all the active branches (apart from 3.5) ? |
sure, I'll merge it later today. thanks for the review! |
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1877 from jithin23/ZOOKEEPER-4537 (cherry picked from commit f770467) Signed-off-by: Mate Szalay-Beko <mszalay@cloudera.com>
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1877 from jithin23/ZOOKEEPER-4537 (cherry picked from commit f770467) Signed-off-by: Mate Szalay-Beko <mszalay@cloudera.com>
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes #1877 from jithin23/ZOOKEEPER-4537 (cherry picked from commit f770467) Signed-off-by: Mate Szalay-Beko <mszalay@cloudera.com>
merge is done, thank you @jithin23 for the contribution! |
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes apache#1877 from jithin23/ZOOKEEPER-4537
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes apache#1877 from jithin23/ZOOKEEPER-4537 Co-authored-by: jithin23 <jithin.girish@gmail.com>
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes apache#1877 from jithin23/ZOOKEEPER-4537
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes apache#1877 from jithin23/ZOOKEEPER-4537 Co-authored-by: jithin23 <jithin.girish@gmail.com>
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes apache#1877 from jithin23/ZOOKEEPER-4537 (cherry picked from commit f770467) Signed-off-by: Mate Szalay-Beko <mszalay@cloudera.com>
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request. Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block. Fix here is to ensure that we read and process commitIsWaiting inside a sync block. https://issues.apache.org/jira/browse/ZOOKEEPER-4537 Author: jithin23 <jithin.girish@gmail.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mate Szalay-Beko <symat@apache.org> Closes apache#1877 from jithin23/ZOOKEEPER-4537 (cherry picked from commit f770467) Signed-off-by: Mate Szalay-Beko <mszalay@cloudera.com>
Zookeeper server can get stuck when it has just one client and the only way it recovers is due to a socket timeout or another client commit request.
Sync thread reads commitIsWaiting outside of a sync block and acts on this information in a sync block later. The actual status of commitIsWaiting can change between the time where commitIsWaiting is read and acted upon because commit thread updates it outside a sync block.
Fix here is to ensure that we read and process commitIsWaiting inside a sync block.
https://issues.apache.org/jira/browse/ZOOKEEPER-4537