Skip to content
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-3471] Fix potential lock unavailable due to dangling ephemeral nodes left during local session upgrading #1025

Closed
wants to merge 1 commit into from

Conversation

lvfangmin
Copy link
Contributor

No description provided.

@@ -992,6 +990,7 @@ public void submitRequestNow(Request si) {
touch(si.cnxn);
boolean validpacket = Request.isValid(si.type);
if (validpacket) {
setLocalSessionFlag(si);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be missing some info here (Please correct me if I am). So this happening only for requests going through RequestThrottler? And not the requests going through RequestProcessor? (Since this submitRequestNow function is being called only in RequestThrottler)
Appreciate if you could explain little bit more. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure I understand your question here, all the requests will go through RequestThrottler, and then being put into RequestProcessor now.

So no request will be put into RequestProcessor directly, right? Let me know if I didn't get your question.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lvfangmin . I think I misunderstood. It was good to clarify and I checked little deeper after that. Yes, now I understood all the requests go through RequestThrottler.

And the change looks good to me. Thanks for fixing it.

@eolivelli
Copy link
Contributor

@hanm @anmolnar do you have cycles for a review?

@hanm
Copy link
Contributor

hanm commented Sep 12, 2019

I left a comment in JIRA a while ago. Basically, the change looks fine but I failed to reason about the exact race condition and why this change could fix it, thus was asking a little bit clarification in JIRA.

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lvfangmin
Copy link
Contributor Author

@hanm sorry for the lately reply, was fighting for a serials of prod issues due to strange JVM AVX bugs.

I've added the detailed flow about the race condition in the JIRA, let me know if it's not clear.

Checked the Jenkins, it's failed due to a flaky metric test, this PR shouls be ready to go.

@eolivelli @hanm @anmolnar please help merge it if it looks good.

@asfgit asfgit closed this in 4951a09 Oct 9, 2019
@anmolnar
Copy link
Contributor

anmolnar commented Oct 9, 2019

Committed to master branch. Thanks @lvfangmin !

@hanm
Copy link
Contributor

hanm commented Oct 16, 2019

@hanm sorry for the lately reply, was fighting for a serials of prod issues due to strange JVM AVX bugs.

@lvfangmin
NP, and sorry for late reply on my side as well (similar situations here, was fighting prod issues).
The comments on JIRA make sense. Really appreciate your follow ups on this.

stickyhipp pushed a commit to stickyhipp/zookeeper that referenced this pull request Aug 19, 2020
…ral nodes left during local session upgrading

Author: Fangmin Lyu <fangmin@apache.org>

Reviewers: andor@apache.org

Closes apache#1025 from lvfangmin/ZOOKEEPER-3471
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Aug 31, 2022
…ral nodes left during local session upgrading

Author: Fangmin Lyu <fangmin@apache.org>

Reviewers: andor@apache.org

Closes apache#1025 from lvfangmin/ZOOKEEPER-3471
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Sep 3, 2022
…ral nodes left during local session upgrading

Author: Fangmin Lyu <fangmin@apache.org>

Reviewers: andor@apache.org

Closes apache#1025 from lvfangmin/ZOOKEEPER-3471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants