feat: add continue_on_error to compact_database#5196
Open
LuciferYang wants to merge 1 commit into
Open
Conversation
By default the first failing table aborted the entire database compaction. Add continue_on_error so failures are recorded per table (metrics=None plus an error string) and the remaining tables are still compacted. Default behavior is unchanged.
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.
compact_databasewalks every table under a namespace and compacts each one, but the first table that failed aborted the whole run — so one bad table meant none of the tables after it got compacted.This adds a
continue_on_errorflag (defaultFalse, so existing behavior is unchanged). When it's on, a failing table is recorded in the returned list as{"table_id": ..., "metrics": None, "error": <message>}and the remaining tables still compact; a failed table is told apart from one that simply needed no compaction by the presence of theerrorkey, and the full traceback still goes to the log. Cross-table parallelism is left out on purpose, since eachcompact_filesalready runs its own Ray pool and running tables concurrently would risk oversubscribing the cluster.Added unit tests for both paths — failures recorded with the run continuing, and the default aborting on the first failure.