[FIXED] Clustering: Snapshot skip sequence on error #923
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.
If the leader had an issue sending a requested message, it would
simply log the error but continue with the next. The consequence
would be that the follower would get a "gap" and empty the store
up to that sequence assuming this was the new first available
message.
The missing
return
statement has been added, but there wouldstill be a situation where the follower could wrongly assume that
the mismatch in sequence between the request and the response
meant that this was the new first available message in the leader.
The leader is now sending - through the reply subject - information
that indicates that this is the first message. If not, the follower
has to verify that when getting a mismatch sequence, if this is
because messages were lost or because this is indeed the first
available. It is possible through a request of a single message
as opposed to a batch.
Also replaced some panic() calls due to Unmarshal() where a returned
error is more appropriate.
Resolves #921
Signed-off-by: Ivan Kozlovic ivan@synadia.com