cockroachdb / cockroach

CockroachDB - the open source, cloud-native distributed SQL database.
https://www.cockroachlabs.com
Other
29.49k stars 3.69k forks source link

ui: databases pages can crash if query fetching stores fails #126348

Open xinhaoz opened 3 days ago

xinhaoz commented 3 days ago

Describe the problem

The DB pages should not fail on any one query failure. In #118904, we erroneously started reading rows unconditionally from the SHOW RANGES response, which leads to a page crash. https://github.com/cockroachdb/cockroach/blob/18a2af14d9690f433ce47e00a09e3090687b801d/pkg/ui/workspaces/cluster-ui/src/api/databaseDetailsApi.ts#L385

These queries can't show partial results so we should just exit on returned errors.

To Reproduce This can be seen in clusters with an unavailable replica, as the query fetching store ids via SHOW RANGES will fail.

Epic CRDB-37558

blathers-crl[bot] commented 3 days ago

Hi @xinhaoz, please add branch-* labels to identify which branch(es) this C-bug affects.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.