Reduce DuckLake table materialization conflicts#710
Open
leonardovida wants to merge 1 commit intoduckdb:masterfrom
Open
Reduce DuckLake table materialization conflicts#710leonardovida wants to merge 1 commit intoduckdb:masterfrom
leonardovida wants to merge 1 commit intoduckdb:masterfrom
Conversation
555e4b7 to
a700b22
Compare
a700b22 to
4b96695
Compare
Collaborator
|
so the fix is to hack the persist_docs operation for Ducklake tables to occur outside of the main transaction? |
Author
We are working on the "real" fix, that will happen on the DuckLake side. In the meantime this might be a possible approach, though it assumes customers do not relay on the invariant of comments being in the same transactions as the CTAS (so possibly having the CTAS go through but not the comment part). What is your stance on this @jwills ? |
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.
We found that the real concurrency issue is dbt
persist_docson DuckLake, specifically the COMMENT ON TABLE / COMMENT ON COLUMN path under concurrent model builds.Concurrent CTAS alone was fine, and CTAS+rename was also fine, but conflicts appeared when comments were part of the same write flow. I simplified the fix that I originally posted by keeping DuckLake retries for transient
TransactionExceptionsand deferringpersist_docsuntil after commit.Initially I created a PR that was explicitly retrying on failures, now this PR is solely focusing on
persist_docs