Skip to content

[backport 3.5] limbo: fix a crash in linearization point waiting#11875

Merged
Gerold103 merged 1 commit intorelease/3.5from
backport/release/3.5/11845
Oct 9, 2025
Merged

[backport 3.5] limbo: fix a crash in linearization point waiting#11875
Gerold103 merged 1 commit intorelease/3.5from
backport/release/3.5/11845

Conversation

@TarantoolBot
Copy link
Collaborator

@TarantoolBot TarantoolBot commented Oct 1, 2025

(This PR is a backport of #11845 to release/3.5 to a future 3.5.1 release.)


The DB state synchronization for a linearizable transaction is trying to wait for the receipt of all potentially confirmed synchro txns from a remote master, and then waits for their confirmation locally. Thus guaranteeing, that if any transaction was committed on the master before this point, then it is now visible on the current replica too.

Waiting for the synchro txns confirmation was done in a way that if the limbo isn't empty, then it 100% must contain a synchro txn in it.

But it is not always so. Sometimes it might contain a volatile async txn, which isn't written to WAL yet. Or it might even contain dummy entries created by the limbo flush operation (for a snapshot, for a new replica join). About these things the linearization sync must not care and should treat them like if the limbo is empty.

Note that there might be more places where txn_limbo_is_empty() seems not exactly 100% safe to use, but for none of them a reproducer could be designed. The other places might actually be safe until proven otherwise.

Closes #11807

NO_DOC=bugfix

The DB state synchronization for a linearizable transaction is
trying to wait for the receipt of all potentially confirmed
synchro txns from a remote master, and then waits for their
confirmation locally. Thus guaranteeing, that if any transaction
was committed on the master before this point, then it is now
visible on the current replica too.

Waiting for the synchro txns confirmation was done in a way that
if the limbo isn't empty, then it 100% must contain a synchro txn
in it.

But it is not always so. Sometimes it might contain a volatile
async txn, which isn't written to WAL yet. Or it might even
contain dummy entries created by the limbo flush operation (for a
snapshot, for a new replica join). About these things the
linearization sync must not care and should treat them like if the
limbo is empty.

Note that there might be more places where txn_limbo_is_empty()
seems not exactly 100% safe to use, but for none of them a
reproducer could be designed. The other places might actually be
safe until proven otherwise.

Closes #11807

NO_DOC=bugfix

(cherry picked from commit 4db3d1e)
@TarantoolBot TarantoolBot requested a review from a team as a code owner October 1, 2025 17:51
@TarantoolBot TarantoolBot added the full-ci Enables all tests for a pull request label Oct 1, 2025
@TarantoolBot TarantoolBot changed the title [Backport release/3.5] limbo: fix a crash in linearization point waiting [backport 3.5] limbo: fix a crash in linearization point waiting Oct 1, 2025
@coveralls
Copy link

Coverage Status

coverage: 87.632% (+0.01%) from 87.619%
when pulling 04f25ef on backport/release/3.5/11845
into 1a494c6
on release/3.5
.

@Gerold103 Gerold103 removed the request for review from a team October 3, 2025 12:58
@Gerold103 Gerold103 merged commit e0f41b0 into release/3.5 Oct 9, 2025
43 of 61 checks passed
@Gerold103 Gerold103 deleted the backport/release/3.5/11845 branch October 9, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants