Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Tx from TxManager on rollback #281

Merged
merged 8 commits into from
Oct 14, 2024
Merged

Remove Tx from TxManager on rollback #281

merged 8 commits into from
Oct 14, 2024

Conversation

Y--
Copy link
Collaborator

@Y-- Y-- commented Oct 14, 2024

Fixes #279

Also adds a test that removes DuckDB singleton and re-creates it: this is when the crash was happening.

And fully consume the explain output stream from DuckDB

Comment on lines +29 to +30
lock_guard<mutex> l(transaction_lock);
transactions.erase(transaction);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the fix

if (table->relid) {
auto rel = RelationIdGetRelation(table->relid);
auto namespace_oid = RelationGetNamespace(rel);
RelationClose(rel);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Minor cleanup - move it higher since we were closing it in both branches below

Copy link
Collaborator

@JelteF JelteF left a comment

Choose a reason for hiding this comment

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

LGTM, but yeah if you can add a test that reproduces this that would be great.

@Y-- Y-- requested a review from JelteF October 14, 2024 12:41
@Y-- Y-- enabled auto-merge (squash) October 14, 2024 13:49
@Y-- Y-- merged commit 7eb10c7 into main Oct 14, 2024
4 checks passed
@Y-- Y-- deleted the yl/fix-tx-leak branch October 14, 2024 13:49
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.

"EXPLAIN" statement Segmentation fault
2 participants