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

DataShard: EvWrite doesn't handle immediate writes with TxId=0 correctly #14553

Closed
snaury opened this issue Feb 13, 2025 · 0 comments · Fixed by #14565
Closed

DataShard: EvWrite doesn't handle immediate writes with TxId=0 correctly #14553

snaury opened this issue Feb 13, 2025 · 0 comments · Fixed by #14565
Assignees
Labels
area/datashard Issues related to datashard tablets (relational table partitions) bug Something isn't working

Comments

@snaury
Copy link
Member

snaury commented Feb 13, 2025

It was discovered that immediate EvWrite doesn't work properly when volatile transactions are present. We want to avoid allocating TxIds on the fast path for immediate writes, however when immediate writes conflict with volatile transactions that are not committed in the LocalDB yet, we need to upgrade them to an uncommitted write that is paired with a committed volatile tx record with a proper dependency graph. Uncommitted writes need a global TxId, which needs to be allocated on demand. The current EvWrite implementation was partially copied from BulkUpsert, which used TNeedGlobalTxId exception to indicate that operation needs to be restarted with an allocated global TxId, and EvWrite implementation handles it in the same way. However, unlike BulkUpsert the EvWrite implementation uses a UserDb abstraction, which actually never throws TNeedGlobalTxId. This causes such writes to break in subtle ways and may short circuit current undecided volatile writes, making them disappear.

@snaury snaury added area/datashard Issues related to datashard tablets (relational table partitions) bug Something isn't working labels Feb 13, 2025
@snaury snaury self-assigned this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datashard Issues related to datashard tablets (relational table partitions) bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant