release-22.1: [CRDB-3303] ui: handle latency not defined on network page #78628
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #78292 on behalf of @Santamaura.
/cc @cockroachdb/release
Previously when a cluster with multiple nodes had a node stopped
and then another node quickly started, the network page would crash.
This was due to the node object holding the latency value being
undefined and the ui trying to read this key when that was undefined.
This occurs when a node is in an
UNAVAILABLE
state.This patch resolves the issue by being more defensive on the front
end by safely attempting to access latency and if it is undefined,
set the value to 0. The existing code is able to handle this case
afterward and will eventually set the user friendly latency status
to
--
.Resolves: #59322
Release note (ui change): Fixes a bug where a node in the
UNAVAILABLE
state will not have latency defined and cause thenetwork page to crash.
Overview list page & network page when node status is
UNAVAILABLE
:Release justification: 1 Line change for useful bug fix