Core: Implement unregister table in catalogs and RCKs - #18203
Merged
Merged
Conversation
Co-authored-by: Daniel Weeks <daniel.c.weeks@gmail.com>
Co-authored-by: Marco Kroll <marco.kroll@databricks.com>
Co-authored-by: Marco Kroll <marco.kroll@databricks.com>
Co-authored-by: Daniel Weeks <daniel.c.weeks@gmail.com>
mkroll-db
marked this pull request as ready for review
September 22, 2026 16:55
Contributor
|
Thanks for getting this going again @mkroll-db! This fell off my radar. |
Contributor
Author
|
@rambleraptor I'm fine in closing the current PR and reviving yours. I just wanted to ensure that we continue working on it. It fell off my radar first so. |
mkroll-db
force-pushed
the
unregister-table
branch
from
September 24, 2026 10:02
d5d26fb to
a86231e
Compare
Comment on lines
+326
to
+337
| Tasks.foreach(identifier) | ||
| .retry(initialMetadata.propertyAsInt(COMMIT_NUM_RETRIES, COMMIT_NUM_RETRIES_DEFAULT)) | ||
| .exponentialBackoff( | ||
| initialMetadata.propertyAsInt( | ||
| COMMIT_MIN_RETRY_WAIT_MS, COMMIT_MIN_RETRY_WAIT_MS_DEFAULT), | ||
| initialMetadata.propertyAsInt( | ||
| COMMIT_MAX_RETRY_WAIT_MS, COMMIT_MAX_RETRY_WAIT_MS_DEFAULT), | ||
| initialMetadata.propertyAsInt( | ||
| COMMIT_TOTAL_RETRY_TIME_MS, COMMIT_TOTAL_RETRY_TIME_MS_DEFAULT), | ||
| 2.0 /* exponential */) | ||
| .onlyRetryOn(CommitFailedException.class) | ||
| .run(tableIdentifier -> unregistered.set(unregisterTableOnce(tableIdentifier))); |
Contributor
There was a problem hiding this comment.
This doesn't make sense to me. Unregister is a single operation, so why do we have retry with exponential backoff? We don't do this for other operations like rename. Overall, seems unnecessary and over complicated.
Contributor
Author
There was a problem hiding this comment.
Initially I had a foreach (endless)-loop which I didn't like. I then looked at the code and found that exponentialBackoff is used which was much better.
BUT I agree it's overkill. I removed it in d07d8c6
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.
Adds catalog-level
unregisterTablesupport introduced in #16400 in the REST catalog fixture and compatibility kit.Unregister removes a table from the catalog without deleting its data or metadata files.
It returns a read-only table containing the last registered metadata. This can be used to register the table (with another catalog) again.
Disclaimer
Parts of the code were generated with AI.
This is a reopen of #16584 from @rambleraptor