-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[controller][test] Fix issues in data recovery API (#572)
* [controller][test] Fix issues in data recovery API This rb targets several issues in the data recovery API: 1. Today, during data recovery, only when the version number from the source equals to the current version in the dest colo, we bump a store's version to LargestUsedVersionNumber+1 in parent and use the increased version for data recovery. So, if the version number from the source is less than the current version in the dest, we simply use it in the dest. As a result, data recovery can not complete successfully, because backup version cleanup thread can kick in, consider it as an expired backup version, and delet it. As a fix to it, we should extends current condition, and increase the store version for such cases as well. On the other hand, if the version number from the source colo is larger than current version in dest colo, we can use it for the dest colo without increasing it. This is fine because it is larger than the current, and resources for this version will be deleted during prepareDataRecovery. So, even though the version number is used (created and then deleted) in dest colo before, it can still be reused. 2. Users sometimes can put the same colo name for src and dest which is considered as an error operation. This rb adds guardrail to protect such cases and fails early. Integration tests are also improved to cover the above two issues and verify the correctness of this fix.
- Loading branch information
Showing
4 changed files
with
93 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters