-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage/reports: change node liveness considerations
Before this patch, whether a node was "alive" or "dead" did not matter for the under-replicated ranges count in system.replication_stats. This patch makes replicas on dead stores be ignored when counting replicas for purposes of the underreplicated counter. Liveness used to matter for the unavailable count and for the system.critical_localities report (and continues to matter). Note that this change interestingly means that a range can be considered both under-replicated and over-replicated at the same time - if there's too many replicas, but sufficiently many of them are dead. This patch also changes the liveness criteria across the board for the reports that cared about liveness (unavailable ranges, under-replicated ranges and critical localities). The code was buggy in that a decomissioning node was considered live for 5 minutes after it stopped heartbeating its liveness record, whereas a non-decomissioning one was only considered live for a few seconds. The patch fixes it by using the same logic to make liveness determinations as the underreplicated metric does - you're dead as soon as the liveness record expires regardless of decomissioning status. Release note (sql change): Ranges are now considered under-replicated by the system.replication_stats report when one of the replicas is unresponsive (or the respective node is not running).
- Loading branch information
1 parent
b3f320a
commit bd9a8af
Showing
4 changed files
with
35 additions
and
25 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