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

QQ: handle case where a stale read request results in member crash. (backport #12636) #12637

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Nov 1, 2024

It is possible for a slow running follower with local consumers to crash after a snapshot installation as it tries to read an entry from its log that is no longer there (as it has been consumed and completed by another node but still refers to prior consumers on the current node).

This commit makes the log effect callback function more defensive to check that the number of commands returned by the log effect isn't different from what was requested. if it is different we consider this a stale read request and return no further effects.

Fixes #12635


This is an automatic backport of pull request #12636 done by Mergify.

It is possible for a slow running follower with local consumers
to crash after a snapshot installation as it tries to read an entry
from its log that is no longer there (as it has been consumed and
completed by another node but still refers to prior consumers on the
current node).

This commit makes the log effect callback function more defensive
to check that the number of commands returned by the log effect
isn't different from what was requested. if it is different we
consider this a stale read request and return no further effects.

(cherry picked from commit 94e6779)
@michaelklishin michaelklishin added this to the 4.0.4 milestone Nov 1, 2024
@michaelklishin michaelklishin merged commit 50b5d74 into v4.0.x Nov 1, 2024
195 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.0.x/pr-12636 branch November 1, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants