[Feature] Support marking data files as shared in tablet metadata and skipping to delete shared data files in vacuum, leaving them for full gc to clean up
Why I'm doing:
This is a preliminary work for tablet splitting and merging. When an old tablet is split to two new tablets, the two new tablets will share all the data files (segment files, delvec files, cloud-native pk index files). These shared data files need to be marked as shared in tablet metadata and skipped to delete them in vacuum, leaving them for full gc to clean up.
What I'm doing:
Support marking data files as shared in tablet metadata and skipping to delete shared data files in vacuum, leaving them for full gc to clean up.
Fixes https://github.com/StarRocks/starrocks/issues/59134
What type of PR is this:
- [ ] BugFix
- [x] Feature
- [ ] Enhancement
- [ ] Refactor
- [ ] UT
- [ ] Doc
- [ ] Tool
Does this PR entail a change in behavior?
- [ ] Yes, this PR will result in a change in behavior.
- [x] No, this PR will not result in a change in behavior.
If yes, please specify the type of change:
- [ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
- [ ] Parameter changes: default values, similar parameters but with different default values
- [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
- [ ] Feature removed
- [ ] Miscellaneous: upgrade & downgrade compatibility, etc.
Checklist:
- [x] I have added test cases for my bug fix or my new feature
- [ ] This pr needs user documentation (for new or modified features or behaviors)
- [ ] I have added documentation for my new feature or new function
- [ ] This is a backport pr
Bugfix cherry-pick branch check:
- [x] I have checked the version labels which the pr will be auto-backported to the target branch
- [ ] 3.5
- [ ] 3.4
- [ ] 3.3
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
[Java-Extensions Incremental Coverage Report]
:white_check_mark: pass : 0 / 0 (0%)
[FE Incremental Coverage Report]
:white_check_mark: pass : 0 / 0 (0%)
[BE Incremental Coverage Report]
:x: fail : 38 / 54 (70.37%)
file detail
| path | covered_line | new_line | coverage | not_covered_line_detail | |
|---|---|---|---|---|---|
| :large_blue_circle: | be/src/storage/lake/vacuum.cpp | 10 | 17 | 58.82% | [331, 342, 343, 353, 1011, 1023, 1031] |
| :large_blue_circle: | be/src/storage/lake/rowset.cpp | 4 | 6 | 66.67% | [132, 174] |
| :large_blue_circle: | be/src/storage/lake/meta_file.cpp | 18 | 24 | 75.00% | [100, 170, 259, 260, 337, 412] |
| :large_blue_circle: | be/src/storage/lake/rowset_update_state.cpp | 4 | 5 | 80.00% | [572] |
| :large_blue_circle: | be/src/storage/lake/update_manager.cpp | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | be/src/storage/lake/txn_log_applier.cpp | 1 | 1 | 100.00% | [] |