Skip to content

Conversation

@mergify
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.

3 participants