metabase: drop useless tomoveit bucket#3763
Merged
roman-khimov merged 2 commits intomasterfrom Dec 29, 2025
Merged
Conversation
Member
roman-khimov
commented
Dec 29, 2025
- Nothing reads the data from it (status not counted).
- It's only set for a very specific case.
- It requires an additional DB transaction.
- In a dynamic shard environment this doesn't make much sense conceptually, mark can be obsolete.
- Proper solution is kinda local policer that should cover a bit more cases, subject of After replication of object to another shard, the object remains on the returned disk forever #2087.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3763 +/- ##
==========================================
- Coverage 25.89% 25.79% -0.11%
==========================================
Files 659 657 -2
Lines 42305 42175 -130
==========================================
- Hits 10953 10877 -76
+ Misses 30349 30308 -41
+ Partials 1003 990 -13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the unused "tomoveit bucket" functionality from the metabase, which was used to mark objects for relocation to another shard. As described in the PR description, this feature is being removed because:
- No code actually reads the data (except for status queries)
- It's only set in a very specific case (when an object already exists on a non-primary shard)
- It requires an additional DB transaction
- In a dynamic shard environment, these marks can become obsolete
Key changes:
- Removed the tomoveit bucket and all related database operations (ToMoveIt, DoNotMove, Movable methods)
- Simplified object placement logic in the storage engine by removing index-based shard movement tracking
- Updated metabase migration to version 9 to delete the obsolete tomoveit bucket
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/local_object_storage/shard/move.go | Deleted file containing shard-level ToMoveIt method for marking objects for relocation |
| pkg/local_object_storage/metabase/movable.go | Deleted file containing metabase operations for managing movable objects |
| pkg/local_object_storage/metabase/movable_test.go | Deleted tests for movable object functionality |
| pkg/local_object_storage/metabase/version.go | Added tomoveit bucket to list of obsolete buckets deleted in version 9 migration |
| pkg/local_object_storage/metabase/util.go | Renamed toMoveItPrefix to unusedToMoveItPrefix and removed toMoveItBucketName variable |
| pkg/local_object_storage/metabase/status.go | Removed bucket reading logic from readBuckets function (now only returns HeaderField data) |
| pkg/local_object_storage/metabase/status_test.go | Removed test case for "moved" object status |
| pkg/local_object_storage/metabase/metadata.go | Removed FilterType case that called delUniqueIndexes during metadata deletion |
| pkg/local_object_storage/metabase/delete.go | Removed delUniqueIndexes helper function that cleaned tomoveit bucket |
| pkg/local_object_storage/metabase/delete_test.go | Removed test assertions checking tomoveit index during deletion |
| pkg/local_object_storage/metabase/control.go | Removed tomoveit bucket from static buckets list |
| pkg/local_object_storage/metabase/containers_test.go | Removed ToMoveIt test case |
| pkg/local_object_storage/metabase/VERSION.md | Updated documentation to reflect removal of tomoveit bucket in version 9 |
| pkg/local_object_storage/engine/put.go | Removed shard index parameter and ToMoveIt marking logic when objects already exist on non-primary shards |
| pkg/local_object_storage/engine/evacuate.go | Removed shard index parameter from putToShard calls during evacuation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0e456ef to
7fb6f4a
Compare
1. Nothing reads the data from it (status not counted). 2. It's only set for a very specific case. 3. It requires an additional DB transaction. 4. In a dynamic shard environment this doesn't make much sense conceptually, mark can be obsolete. 5. Proper solution is kinda local policer that should cover a bit more cases, subject of #2087. Signed-off-by: Roman Khimov <roman@nspcc.ru>
Defect of 0ddcf2b. Signed-off-by: Roman Khimov <roman@nspcc.ru>
7fb6f4a to
6a6f162
Compare
cthulhu-rider
approved these changes
Dec 29, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.