Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

shardddl: add lock and version for optimistic info (#1035) #1051

Merged
merged 4 commits into from
Sep 17, 2020

Conversation

ti-srebot
Copy link

cherry-pick #1035 to release-2.0


What problem does this PR solve?

  • second ddl's lock may be deleted when first ddl resolved.
  • new info putted to etcd may be deleted when previous ddl resolved

What is changed and how it works?

  • add lock in handleInfo and handleOperation to avoid concurrency conflict
  • record the version of info, only delete info if all version of info are greater or equal then that in etcd.

Check List

Tests

  • Unit test

@ti-srebot ti-srebot added priority/normal Minor change, requires approval from ≥1 primary reviewer status/PTAL This PR is ready for review. Add this label back after committing new changes type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport) labels Sep 17, 2020
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added status/LGT1 One reviewer already commented LGTM needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Sep 17, 2020
@csuzhangxc csuzhangxc added this to the v2.0.0 RC.3 milestone Sep 17, 2020
@csuzhangxc csuzhangxc merged commit 062420d into pingcap:release-2.0 Sep 17, 2020
@csuzhangxc csuzhangxc added already-update-release-note The release note is updated. Add this label once the release note is updated and removed needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Oct 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-update-release-note The release note is updated. Add this label once the release note is updated priority/normal Minor change, requires approval from ≥1 primary reviewer status/LGT1 One reviewer already commented LGTM type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants