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.
131232: builtins: handle unavailable ranges in `crdb_internal.ranges` r=rytaft,mgartner a=miraradeva Previously, when querying crdb_internal.{lease_holder, range_stats} (e.g. as part of querying crdb_internal.ranges), a single unavailable range would result in the entire query failing. This is problematic when investigating clusters with unavailable ranges as it fails to show information even for the available ranges. This commit adds new variants of `crdb_internal. {lease_holder, range_stats}`, `crdb_internal. {lease_holder, range_stats}_with_errors`, that include any encountered errors in the JSON output instead of failing the entire query. These are then used in `crdb_internal.ranges`, which now includes the errors encountered while fetching the leaseholder and range stats. Fixes: cockroachdb#128088 Release note (sql change): Two new builtins, crdb_internal. {lease_holder, range_stats}_with_errors, include errors encountered while fetching lease holder and range stats. These new builtins are used by `crdb_internal.ranges`, which includes a new column, `errors`, that combines the errors from the builtins. ---- Example output of `select range_id, lease_holder, range_size, errors from crdb_internal.ranges;` <img width="1728" alt="Screenshot 2024-09-23 at 2 37 24 PM" src="https://github.com/user-attachments/assets/87a9b0ac-6de0-4677-8e5d-6031133beaa5"> Co-authored-by: Mira Radeva <[email protected]>
- Loading branch information
Showing
11 changed files
with
195 additions
and
18 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.