Skip to content

Fix volatile result sent before it is fully committed#2598

Merged
snaury merged 1 commit intoydb-platform:mainfrom
snaury:KIKIMR-21156-fix-early-volatile-reply
Mar 11, 2024
Merged

Fix volatile result sent before it is fully committed#2598
snaury merged 1 commit intoydb-platform:mainfrom
snaury:KIKIMR-21156-fix-early-volatile-reply

Conversation

@snaury
Copy link
Copy Markdown
Member

@snaury snaury commented Mar 11, 2024

Changelog entry

Fix volatile result sent before it is fully committed.

Changelog category

  • Bugfix

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 11, 2024

2024-03-11 10:36:44 UTC Pre-commit check for 286bf8d has started.
2024-03-11 10:36:47 UTC Build linux-x86_64-release-asan is running...
🟢 2024-03-11 10:42:25 UTC Build successful.
2024-03-11 10:42:40 UTC Tests are running...
🔴 2024-03-11 12:40:41 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
15012 14431 0 67 486 28

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 11, 2024

2024-03-11 10:36:51 UTC Pre-commit check for 286bf8d has started.
2024-03-11 10:36:54 UTC Build linux-x86_64-release-cmake14 is running...
🟢 2024-03-11 10:41:44 UTC Build successful.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 11, 2024

2024-03-11 10:44:20 UTC Pre-commit check for 286bf8d has started.
2024-03-11 10:44:21 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-03-11 10:49:38 UTC Build successful.
2024-03-11 10:49:47 UTC Tests are running...
🔴 2024-03-11 12:31:00 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
68294 57342 0 10 10922 20

@snaury snaury marked this pull request as ready for review March 11, 2024 12:32
@snaury snaury requested a review from azevaykin March 11, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants