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

[FIXED] Clustering: Snapshot skip sequence on error #923

Merged
merged 1 commit into from Aug 28, 2019
Merged

Conversation

kozlovic
Copy link
Member

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 would
still 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

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 would
still 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>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 91.974% when pulling 5c6d507 on fix_921 into d9c28b6 on master.

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit 0d12646 into master Aug 28, 2019
@kozlovic kozlovic deleted the fix_921 branch August 28, 2019 19:15
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.

Snapshot skip sequence on error. Consistent problem.
3 participants