feat(index): support dry_run in drop_global_index#489
Draft
JunRuiLee wants to merge 6 commits into
Draft
Conversation
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.
Purpose
Add
dry_runtodrop_global_index, matching Java's #8309. A dry run reports how many global index files a drop would remove, committing nothing — a safety preview before the irreversible metadata commit. Because it lives in the sharedGlobalIndexDropBuilder, it covers all supported types (btree/bitmap/lumina/vindex) in one change.Changes
GlobalIndexDropBuilder: newwith_dry_run(bool);execute()still returns the matched count (usize), but on dry-run short-circuits before the commit, so nothing is written. The non-dry-run path is unchanged.sys.drop_global_index: parses thedry_runarg (true/false, case-insensitive; invalid → error), and on dry-run returnsWould drop N global index file(s)instead of committing.Out of scope
partitionsremainsNotImplemented(separate follow-up).Tests
drop_global_index(... dry_run => true)leaves$table_indexesunchanged, then a real drop empties it; invaliddry_runvalue is rejected.