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 the potential concurrency problem when clone the shared delta index (#2030) #2032

Merged
merged 2 commits into from
May 31, 2021

Conversation

ti-srebot
Copy link
Collaborator

@ti-srebot ti-srebot commented May 31, 2021

cherry-pick #2030 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In tics repo:
git pr https://github.com/pingcap/tics/pull/2032

After apply modifications, you can push your change to this PR via:

git push [email protected]:ti-srebot/tics.git pr/2032:release-4.0-1076ba58a438

What problem does this PR solve?

Issue Number: close #2023

Problem Summary: The clone process of the DeltaIndex is not protected by mutex.

What is changed and how it works?

Proposal: xxx

What's Changed:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch:

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

Release note

  • Fix the potential concurrency problem when clone the shared delta index.

@ti-srebot ti-srebot added CHERRY-PICK cherry pick status/LGT1 Indicates that a PR has LGTM 1. labels May 31, 2021
@ti-srebot ti-srebot added the type/bugfix This PR fixes a bug. label May 31, 2021
@ti-srebot ti-srebot added this to the v4.0.14 milestone May 31, 2021
flowbehappy
flowbehappy previously approved these changes May 31, 2021
Copy link
Contributor

@flowbehappy flowbehappy left a comment

Choose a reason for hiding this comment

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

Please fix conflicts.

public:
DeltaIndex() : delta_tree(std::make_shared<DefaultDeltaTree>()), placed_rows(0), placed_deletes(0) {}
DeltaIndex(const DeltaIndex & o)
=======
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix this

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed.

@flowbehappy flowbehappy self-requested a review May 31, 2021 10:51
@flowbehappy flowbehappy dismissed their stale review May 31, 2021 10:53

Need fix

@lidezhu
Copy link
Contributor

lidezhu commented May 31, 2021

/run-all-tests

Copy link
Contributor

@flowbehappy flowbehappy left a comment

Choose a reason for hiding this comment

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

LGTM

@lidezhu lidezhu merged commit 9c49fa2 into pingcap:release-4.0 May 31, 2021
@lidezhu lidezhu deleted the release-4.0-1076ba58a438 branch May 31, 2021 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CHERRY-PICK cherry pick status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants