Skip to content

Conversation

@shangxinli
Copy link
Contributor

Prevents Transaction::Commit() from being called multiple times by:

  • Adding committed_ flag to track transaction state
  • Checking flag at start of Commit() and returning error if already committed
  • Setting flag after successful commit (both empty and non-empty updates)
  • Updating table_ reference after successful catalog update

This ensures transactions can only be committed once, preventing unintended side effects and maintaining transaction semantics.

Prevents Transaction::Commit() from being called multiple times by:
- Adding committed_ flag to track transaction state
- Checking flag at start of Commit() and returning error if already committed
- Setting flag after successful commit (both empty and non-empty updates)
- Updating table_ reference after successful catalog update

This ensures transactions can only be committed once, preventing
unintended side effects and maintaining transaction semantics.
Copy link
Member

@wgtmac wgtmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I think it makes sense and just have some minor comments.

shangxinli and others added 3 commits December 22, 2025 06:47
Co-authored-by: Gang Wu <ustcwg@gmail.com>
Co-authored-by: Gang Wu <ustcwg@gmail.com>
Co-authored-by: Gang Wu <ustcwg@gmail.com>
@wgtmac wgtmac merged commit 7b95952 into apache:main Dec 23, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants