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

Fix partial distributed commit of uncommitted changes during shard restart race #2148

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

snaury
Copy link
Member

@snaury snaury commented Feb 21, 2024

Changelog entry

Fix partial distributed commit of uncommitted changes during shard restart race.

Changelog category

  • Bugfix

Additional information

A rare G0 anomaly was detected with Jepsen, which corresponded to a partial commit of accumulated changes when using persistent distributed transactions. Investigation showed that the Frozen lock flag was not persisted (this flag is set for write locks when they are validated and outgoing readsets are generated, and used to protect lock changes until transaction decides to commit or abort based on other participant decisions), and there was a window after a given shard restarts and before it fully restores the pipeline dependencies (including Frozen flag for locks validated in previous generations). During this time window lock subscription may report lock as unavailable or expired (e.g. when transaction is fully removed from a KQP session, either due to implicit rollback also failing quickly due to shard unavailability, or node restarting and losing all state). This in turn rolled back (previously frozen) lock changes, when they should have been committed instead.

Fixes KIKIMR-21088.

Copy link

github-actions bot commented Feb 21, 2024

2024-02-21 15:38:53 UTC Pre-commit check for 5ae072b has started.
2024-02-21 15:38:54 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-21 15:46:01 UTC Build successful.
2024-02-21 15:46:14 UTC Tests are running...
🔴 2024-02-21 17:24:34 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
67907 56916 0 5 10951 35

Copy link

github-actions bot commented Feb 21, 2024

2024-02-21 15:59:09 UTC Pre-commit check for 5ae072b has started.
2024-02-21 15:59:11 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-21 16:06:27 UTC Build successful.
2024-02-21 16:06:38 UTC Tests are running...
🔴 2024-02-21 17:40:44 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14825 14628 0 22 134 41

@snaury snaury marked this pull request as ready for review February 21, 2024 16:22
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.

None yet

2 participants