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

Deleting table could cause dangling transaction #3828

Closed
spolitov opened this issue Mar 4, 2020 · 0 comments
Closed

Deleting table could cause dangling transaction #3828

spolitov opened this issue Mar 4, 2020 · 0 comments
Assignees
Labels
area/docdb YugabyteDB core features

Comments

@spolitov
Copy link
Contributor

spolitov commented Mar 4, 2020

Table deletion during the transaction is writing data to it could cause the transaction to hang in memory.
Because the transaction coordinator is unable to apply intents at the tablet of this table.

@spolitov spolitov added the area/docdb YugabyteDB core features label Mar 4, 2020
@spolitov spolitov self-assigned this Mar 4, 2020
spolitov added a commit that referenced this issue Mar 8, 2020
Summary:
When a tablet involved in a transaction is deleted, we could get into a
situation when the transaction cannot be fully applied.  This
transaction will stay in its transaction coordinator and prevent status
tablet Raft logs from being cleaned.

Fixed by handling such cases by pretending that the transaction was
applied to the deleted tablet.

Also improved log anchor tracking in the tablet server WebUI, and fixed
potential issues of unsafe modification of a multi-index container
by using the `modify` function with an iterator and a lambda.

Test Plan: ybd --gtest_filter QLTransactionTest.DeleteTableDuringWrite

Reviewers: bogdan, mikhail

Reviewed By: mikhail

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D8084
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features
Projects
None yet
Development

No branches or pull requests

1 participant