[backport 3.3] limbo: do not limit its size on replicas#12026
Merged
Gerold103 merged 1 commit intorelease/3.3from Nov 11, 2025
Merged
[backport 3.3] limbo: do not limit its size on replicas#12026Gerold103 merged 1 commit intorelease/3.3from
Gerold103 merged 1 commit intorelease/3.3from
Conversation
There was a possible deadlock when a replica had box.cfg.replication_synchro_queue_max_size smaller than the master. The scenario was that the replica would receive some transactions, they would all enter the limbo and wait for CONFIRM in "submitted" state. But the master sends more transactions instead of CONFIRM. Those transactions block the applier fiber in txn_commit_submit(), because the fiber can't exceed the limbo max size and is waiting for free space. The free space however will never appear, because those "submitted" transactions aren't going anywhere until CONFIRM receipt. Which in turn will never happen, because the applier fiber is blocked on waiting for limbo space. The only way is to let the replica apply these transactions bypassing the limbo max size limitation. It makes no sense to block them. Otherwise their CONFIRM can't be received. This was probably working until commit 20aad15 ("limbo: handle spurious wakeups on space waiting") (not counting that before that it was broken in many other ways), but seems like wasn't covered by the tests. Closes #11836 NO_DOC=bugfix (cherry picked from commit cc77a6e)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(This PR is a backport of #12017 to
release/3.3to a future3.3.4release.)There was a possible deadlock when a replica had
box.cfg.replication_synchro_queue_max_size smaller than the master.
The scenario was that the replica would receive some transactions, they would all enter the limbo and wait for CONFIRM in "submitted" state.
But the master sends more transactions instead of CONFIRM. Those transactions block the applier fiber in txn_commit_submit(), because the fiber can't exceed the limbo max size and is waiting for free space.
The free space however will never appear, because those "submitted" transactions aren't going anywhere until CONFIRM receipt. Which in turn will never happen, because the applier fiber is blocked on waiting for limbo space.
The only way is to let the replica apply these transactions bypassing the limbo max size limitation. It makes no sense to block them. Otherwise their CONFIRM can't be received.
This was probably working until
commit 20aad15 ("limbo: handle spurious wakeups on space waiting") (not counting that before that it was broken in many other ways), but seems like wasn't covered by the tests.
Closes #11836
NO_DOC=bugfix