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

About adding unique index lost data - There are delete operation scenarios #1205

Open
suyestyle opened this issue Nov 23, 2022 · 3 comments
Open

Comments

@suyestyle
Copy link

Is it possible to solve this scenario?

Add two calculators when there is a delete operation.

  1. The deletion times of the original table are recorded in delete1

  2. The deletion times of the new table are recorded in delete2

When cut-over:

  1. Count the total number of rows in the original table and record it to count1. Get the value of delete1 and calculate: res1=count1-delete1
  2. Count the total number of rows in the new table and record it to count2. Get the value of delete2 and calculate: res2=count2-delete2

When res1 is equal to res2, no data will be lost.

@suyestyle
Copy link
Author

reference only

@dm-2
Copy link
Contributor

dm-2 commented Nov 25, 2022

👋 @suyestyle this might be possible to do during the atomic cut-over but it would cause a delay in the cutover. We have another approach that we use at GitHub - we continuously run test migrations against real data using replicas dedicated to testing gh-ost, which gives us confidence that we're not losing data during migrations.

@suyestyle
Copy link
Author

suyestyle commented Dec 13, 2022

👋 @suyestyle this might be possible to do during the atomic cut-over but it would cause a delay in the cutover. We have another approach that we use at GitHub - we continuously run test migrations against real data using replicas dedicated to testing gh-ost, which gives us confidence that we're not losing data during migrations.

This is great.

Will this feature be added in the next stable release?

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

No branches or pull requests

2 participants