forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: Sort replicas in crdb_internal.ranges table by store ID
This matches the behavior of `SHOW RANGES`, and is the only way for the replicas to be meaningfully ordered in a consistent way. It's odd that the order doesn't even match the order in which the replicas are added. For example, I could see this sequence in the logs for a range: Starting replicas: [s4] Adding s1 results in: [s4,s1] Adding s2 results in: [s4,s1,s2] Removing s4 results in: [s2,s1] Release note (sql change): The entries in the replicas array column of the crdb_internal.ranges virtual table are now always sorted by store ID.
- Loading branch information
1 parent
b9bfb5f
commit daf82ad
Showing
2 changed files
with
14 additions
and
7 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