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

server: wait for reset-to-version task completion #13830

Merged
merged 2 commits into from Nov 23, 2022

Conversation

tabokie
Copy link
Member

@tabokie tabokie commented Nov 22, 2022

Signed-off-by: tabokie xy.tao@outlook.com

What is changed and how it works?

Issue Number: Close #13829

What's Changed:

Wait for completion so that the main thread doesn't exit when the worker thread is still using some static variables.

Fix a segfault when executing reset-to-version with tikv-ctl

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Release note

Fix a segfault when executing reset-to-version with tikv-ctl

Signed-off-by: tabokie <xy.tao@outlook.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 22, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • BusyJay
  • Connor1996

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Copy link
Member

@BusyJay BusyJay left a comment

Choose a reason for hiding this comment

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

Why not waiting will segment fault?

@ti-chi-bot ti-chi-bot added the status/LGT1 Status: PR - There is already 1 approval label Nov 22, 2022
@tabokie
Copy link
Member Author

tabokie commented Nov 22, 2022

Why not waiting will segment fault?

I haven't really verified the fix yet, but from my understanding the detached thread cannot reliably access static variables (comparator returned from ByteswiseComparator() for instance).

Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Status: PR - There are already 2 approvals and removed status/LGT1 Status: PR - There is already 1 approval labels Nov 23, 2022
@tabokie
Copy link
Member Author

tabokie commented Nov 23, 2022

/merge

@ti-chi-bot
Copy link
Member

@tabokie: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 910215e

@ti-chi-bot ti-chi-bot added the status/can-merge Status: Can merge to base branch label Nov 23, 2022
@ti-chi-bot ti-chi-bot merged commit fd197f0 into tikv:master Nov 23, 2022
@ti-chi-bot ti-chi-bot added this to the Pool milestone Nov 23, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #13837.

ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Nov 23, 2022
close tikv#13829

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@tabokie tabokie deleted the 221122-fix-reset-version branch November 23, 2022 05:00
ti-chi-bot added a commit that referenced this pull request Jan 9, 2023
close #13829, ref #13830

Fix a segfault when executing reset-to-version with tikv-ctl

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Xinye Tao <xy.tao@outlook.com>

Co-authored-by: Xinye Tao <xy.tao@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.1 release-note size/M status/can-merge Status: Can merge to base branch status/LGT2 Status: PR - There are already 2 approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reset-to-version segfault
4 participants