Clean up transactions after metadata rollback failures#1092
Open
bill-ph wants to merge 1 commit into
Open
Conversation
6913bd8 to
f0fbbe3
Compare
f0fbbe3 to
1621ae0
Compare
Author
|
The CI failure seems unrelated, these are existing tests, and are passing in other archs, can you rerun the failed CI job, @pdet ? |
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.
Summary
Relevant: #1023
Fix DuckLake rollback cleanup when rolling back the metadata catalog connection fails.
Before this change, failures during metadata rollback could interrupt cleanup and leave transaction state behind. This was especially visible with Postgres metadata catalogs when the metadata backend connection was terminated: DuckLake could fail while trying to rollback, skip connection reset/local file cleanup, and leave the transaction registered in the transaction manager.
This change:
RollbackAndResetConnection()DuckLakeTransactionManager::RollbackTransaction()erases the transaction before rethrowing rollback errorsTests
Added Postgres metadata catalog sqllogictests for:
ROLLBACKafter terminating the metadata backend, asserting the rollback error is surfaced and the attachment remains usable afterwardRan:
cmake --build build/release --target unittest./build/release/test/unittest --test-config test/configs/postgres.json --test-dir ./ test/sql/transaction/postgres_metadata_rollback_error.test./build/release/test/unittest --test-config test/configs/postgres.json --test-dir ./ test/sql/transaction/postgres_metadata_explicit_rollback_error.test./build/release/test/unittest --test-dir ./ test/sql/transaction/transaction_conflict_cleanup.test