-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMPROVED] Memory based streams and NRG behavior during server restar…
…ts (#5506) Improvements to catchups and health checks. Improvements to handling snapshots for memory based wals. With memory based wals we can not use snapshots on restarts, but we do use them while they are running. However if a server becomes a leader with no snapshot it will be forced to stepdown when asked to catchup a follower. So we now inherit a leaders snapshot. Also when we tried to truncate on a mismatch, we needed to truncate the previous index, not current. When we fail due to the previous entry being compacted away, we would reset. We now reset the wal to the prior index and use the truncate term and index. Lastly if we receive a heartbeat with correct index but newer term just inherit. For stream health checks for replicated streams make sure that the monitor routine is running. When waiting on consumer assignments at the beginning of the stream monitor, make sure the consumer monitor is running as well if replicated. On a consumer snapshot, register pre-acks as needed. On stream checkInterestState reset an empty stream to the low ack floor from all consumers. Last fix consistency bug with memstore when skipping msgs on empty stream to ensure first == last + 1. Signed-off-by: Derek Collison <[email protected]> --------- Signed-off-by: Derek Collison <[email protected]>
- Loading branch information
1 parent
743292b
commit 6f05a82
Showing
8 changed files
with
284 additions
and
32 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
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
Oops, something went wrong.