yujun777 opened a new pull request, #22077: URL: https://github.com/apache/doris/pull/22077
## Proposed changes Issue Number: close #xxx <!--Describe your changes.--> Issue: for replica num <= 2, load data may fail during migration. For example, suppose replica num = 1, the only one replica is on BE A. 1. BE A begin a txn T1; 2. suppose current version = 1. begin a migration from BE A to B; 3. End migration, then got: A [decommission, version=1], B [normal, version=1]; 4. Finish txn T1, then A [decommission, version=2]; B[normal, version=1, last failed version=2] 5. Begin a txn T2, but now: A is decommission, B is version fall behind, so T2 will fail. Here is a fix. To decommission A, the steps are as follow: 1. wait A's peer catchup with A; 2. set A's state to decommission, generate a txn water mark M1 for A, A is still both readable and writeable; 3. wait txn before M1 to be finished, generate another txn water mark M2 for A, A is now readable but not writeable; 4. wait txn before M2 to be finished, then delete A; ## Further comments If this is a relatively large or complex change, kick off the discussion at [[email protected]](mailto:[email protected]) by explaining why you chose the solution you did and what alternatives you considered, etc... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
