-
Notifications
You must be signed in to change notification settings - Fork 606
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
Fix volatile result sent before it is fully committed (24-1) #2624
Fix volatile result sent before it is fully committed (24-1) #2624
Conversation
⚪ |
⚪
|
Changelog entry
Fix volatile result sent before it is fully committed.
Changelog category
Additional information
A rare failure was detected with Jepsen when volatile transactions feature is enabled and used. Investigation showed that YDB would sometimes reply SUCCESS to a commit that has actually failed. The underlying issue is that since volatile transactions are prepared in-memory, a PREPARED reply is sent very early in the pipeline, before the (readonly) propose transaction is committed (which is expected, volatile transactions don't have storage in their critical path until they are executed). When storage is a bit slow the volatile transaction may be fast enough to plan and execute while a previous localdb transaction is still committing. When propose localdb transaction finally commits it would erroneously observe the new operation result (which optimistically has SUCCESS while it is waiting for localdb commit and other participants), and would send it thinking this is a propose phase result. The localdb commit with execution side effects may fail however, but the SUCCESS result has already been sent by that time. This is fixed by marking operations that send propose result early, and ignoring operation result on propose completion in such operations.
Fixes KIKIMR-21156. Merges #2505. Merges #2598.