Skip to content

feat: add continue_on_error to compact_database#5196

Open
LuciferYang wants to merge 1 commit into
lance-format:mainfrom
LuciferYang:feat/compact-database-continue-on-error
Open

feat: add continue_on_error to compact_database#5196
LuciferYang wants to merge 1 commit into
lance-format:mainfrom
LuciferYang:feat/compact-database-continue-on-error

Conversation

@LuciferYang

Copy link
Copy Markdown

compact_database walks 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_error flag (default False, 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 the error key, and the full traceback still goes to the log. Cross-table parallelism is left out on purpose, since each compact_files already 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.

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.
@github-actions github-actions Bot added the enhancement New feature or request label Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant