storage: Accepts a snapshot for segment replaceData API#6385
storage: Accepts a snapshot for segment replaceData API#6385ti-chi-bot merged 3 commits intopingcap:masterfrom
Conversation
Signed-off-by: Wish <breezewish@outlook.com>
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
/run-all-tests |
|
/merge |
|
@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 52cf4be |
|
@breezewish: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Signed-off-by: Wish breezewish@outlook.com
What problem does this PR solve?
Issue Number: ref #5237
Problem Summary:
What is changed and how it works?
This PR is extracted from #6378
Changed
dangerouslyReplaceDatato bereplaceData. Now it accepts an optional snapshot parameter, so that it becomes safe.When snapshot parameter is specified, everything data in the snapshot will be replaced, and everything after the snapshot will be kept.
When snapshot is not specified, everything will be replaced.
In this PR, we will not utilize this new feature. It will be used in storage: handle IngestSST using segment split #6378.
Segment::replaceDataAPI does not create a ref file by itself now. The ref file is now created by the caller, in theDeltaMergeStore_Ingest.cpp.Add unit tests for the new replaceData API.
Add randomized tests for the new replaceData. We randomly create a snapshot, and after some iterations (for example, possibly some writes) we will invoke the replaceData. We check whether the write-after-snapshot are preserved.
DeltaMergeStore::dangerouslyReplaceDatais still preserved. It will be dropped in the next PR.Check List
Tests
Side effects
Documentation
Release note