Replace ARTConflictType::TRANSACTION with fatal exception - #23193
Merged
Merged
Conversation
Member
|
Hey, looks good - just checking: is |
Member
Author
|
@lnkuiper ah yea, I thought this was the only location, but there is still a D_ASSERT, as well as a test I forgot to modify that checks for it (although AFAIK, it wasn't actually hitting that case anymore). Let me double check these and will ping you again for review. |
Member
Author
|
@lnkuiper but yes I think ARTConflictType::TRANSACTION should be unused now, so I also have to update the enum, etc., let me handle that now :-) |
Member
|
Great, feel free to mark as ready to merge once you've done that :) |
artjomPlaunov
marked this pull request as draft
June 10, 2026 12:00
artjomPlaunov
marked this pull request as ready for review
June 10, 2026 12:00
Collaborator
|
Thanks! |
krlmlr
pushed a commit
to krlmlr/duckdb
that referenced
this pull request
Jun 21, 2026
Conflict-free merge of the clean commits between resolutions: - Replace ARTConflictType::TRANSACTION with fatal exception (duckdb#23193) - [Dev] Fix variant shredding analysis logic discrepancy with shredded writing (duckdb#23194) - Initialize all `BaseStatistics` members and zero `stats_union` (duckdb#23202) - Initialize `TransactionContext::invalidation_policy` and `auto_rollback` (duckdb#23203)
krlmlr
pushed a commit
to krlmlr/duckdb
that referenced
this pull request
Jun 21, 2026
There is a possible scenario where we can have duplicates in unique ART indexes: if we do a delete + insert on the same key, this turns into the reverse during commit: insert into the main index (creates temporary duplicate state) -> then delete the old rowid (restores back to non-duplicate state). However, in ARTOperator::Insert It shouldn't be possible to reach this temporary gated duplicate state due to transaction + wal locks, i.e. this should now be unreachable, unless the ART is corrupted and hence we now throw a fatal exception at this point. Note that VerifyLeaf could still hit the duplicate leaves unique index scenario, so the logic there remains.
krlmlr
pushed a commit
to krlmlr/duckdb
that referenced
this pull request
Jun 21, 2026
Conflict-free merge of the clean commits between resolutions: - Replace ARTConflictType::TRANSACTION with fatal exception (duckdb#23193) - [Dev] Fix variant shredding analysis logic discrepancy with shredded writing (duckdb#23194) - Initialize all `BaseStatistics` members and zero `stats_union` (duckdb#23202) - Initialize `TransactionContext::invalidation_policy` and `auto_rollback` (duckdb#23203)
krlmlr
pushed a commit
to krlmlr/duckdb
that referenced
this pull request
Jun 21, 2026
Brings these v1.5-variegata commits; they do not overlap with the main/v2.0 line, so they merge with no conflicts: - Replace ARTConflictType::TRANSACTION with fatal exception (duckdb#23193) - [Dev] Fix variant shredding analysis logic discrepancy with shredded writing (duckdb#23194) - Initialize all `BaseStatistics` members and zero `stats_union` (duckdb#23202) - Initialize `TransactionContext::invalidation_policy` and `auto_rollback` (duckdb#23203)
krlmlr
pushed a commit
to krlmlr/duckdb
that referenced
this pull request
Jun 21, 2026
Brings these v1.5-variegata commits; they do not overlap with the main/v2.0 line, so they merge with no conflicts: - Replace ARTConflictType::TRANSACTION with fatal exception (duckdb#23193) - [Dev] Fix variant shredding analysis logic discrepancy with shredded writing (duckdb#23194) - Initialize all `BaseStatistics` members and zero `stats_union` (duckdb#23202) - Initialize `TransactionContext::invalidation_policy` and `auto_rollback` (duckdb#23203)
kaka11chen
pushed a commit
to kaka11chen/astrovela_vane
that referenced
this pull request
Aug 14, 2026
…kdb#23193) There is a possible scenario where we can have duplicates in unique ART indexes: if we do a delete + insert on the same key, this turns into the reverse during commit: insert into the main index (creates temporary duplicate state) -> then delete the old rowid (restores back to non-duplicate state). However, in ARTOperator::Insert It shouldn't be possible to reach this temporary gated duplicate state due to transaction + wal locks, i.e. this should now be unreachable, unless the ART is corrupted and hence we now throw a fatal exception at this point. Note that VerifyLeaf could still hit the duplicate leaves unique index scenario, so the logic there remains. Upstream-Commit: duckdb/duckdb@e36f5ab
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.
There is a possible scenario where we can have duplicates in unique ART indexes: if we do a delete + insert on the same key, this turns into the reverse during commit: insert into the main index (creates temporary duplicate state) -> then delete the old rowid (restores back to non-duplicate state).
However, in ARTOperator::Insert It shouldn't be possible to reach this temporary gated duplicate state due to transaction + wal locks, i.e. this should now be unreachable, unless the ART is corrupted and hence we now throw a fatal exception at this point.
Note that VerifyLeaf could still hit the duplicate leaves unique index scenario, so the logic there remains.