Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED] Clustering: Snapshot skip sequence on error
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>
- Loading branch information
Showing
3 changed files
with
288 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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