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

[fix][meta] deadlock of zkSessionWatcher when zkConnection loss #20122

Merged
merged 6 commits into from Apr 23, 2023

Conversation

tiny-rain
Copy link
Contributor

Fixes #20105

Motivation

The deadlock is caused by the different acquiring lock order in zkwatcher callback and connection check thread in zkSessionWatcher. Meanwhile, the lock of ZkSessionWatch is intending to project the currentStatus field, no need to perform a lock operation when executing checkConnectionStatus method.

Modifications

  1. don't perform a lock operation in ZKSessionWatcher.checkConnectionStatus method, which runs in single thread.
  2. perform a lock operation in ZKSessionWatcher.checkStatus method.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 18, 2023
@mattisonchao
Copy link
Member

mattisonchao commented Apr 18, 2023

@tiny-rain could you please help fix this PR to pass the CI?

dehu and others added 3 commits April 19, 2023 14:22
2.add comment to clarify the potential problems.
@tisonkun tisonkun self-requested a review April 20, 2023 02:00
@michaeljmarshall
Copy link
Member

As discussed on the mailing list https://lists.apache.org/thread/w4jzk27qhtosgsz7l9bmhf1t7o9mxjhp, there is no plan to release 2.9.6, so I am going to remove the release/2.9.6 label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants