Skip to content

Commit

Permalink
Merge #95868 #96446
Browse files Browse the repository at this point in the history
95868: ui: set overview page node list data with stale tag if node is dead r=iAaronBuck a=iAaronBuck

71618: ui: set overview page node list data with stale tag if node is dead

![Screen Shot 2023-01-25 at 4 25 17 PM](https://user-images.githubusercontent.com/73749490/214694475-b946ec5b-0834-4cf0-86a2-cbe28ab529a7.png)
    
Issue:  [#71618](#71618)
Epic: None
    
Release note (ui change): Currently, the stale node metrics displayed to a user in the Cluster Overview Nodes Table may mislead users in to thinking that they are current values when in fact they are stale. This change rectifies that and adds a stale tag to metrics displayed to the user. This allows for users to be informed about the staleness of the data displayed to them regarding dead nodes.

96446: go.mod: bump Pebble to e9d3bb388ad6 r=RaduBerinde a=jbowens

```
e9d3bb38 vfs: handle concurrent directory Syncs in disk-health checking
917d3f3e db: add Options.WithFSDefaults
9fc4a208 db: flushable ingested sstable implementation
4a453f64 Revert "db: unflake TestArchiveCleaner"
31c33365 db: unflake TestArchiveCleaner
6f3bed0d pebble: minor cleanup around obsolete tables
35c90436 objstorage: add link-or-copy functionality
d443ab31 objstorage: use provider in table cache
0ff0f5d4 pebble: add a test for fatal message when table cache hits "no such file"
2367e8d7 sstable: introduce objstorage interface
59603de1 vfs: move Prefetch to vfs.File
654253a6 sstable: sort user-added range keys by suffix descending
```

Epic: None
Release note: None

Close #96414.
Close #96422.
Informs #96420.
Informs #96421.

Co-authored-by: Aaron Buck <[email protected]>
Co-authored-by: Jackson Owens <[email protected]>
  • Loading branch information
3 people committed Feb 3, 2023
3 parents 3f73cfb + 4fba8c8 + f89ff0c commit 18fda97
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1505,10 +1505,10 @@ def go_deps():
patches = [
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "10635b775b3be21b36e4a2594db1026246dacb826f9717e38450f110faca593f",
strip_prefix = "github.com/cockroachdb/[email protected]20230131225459-7540fdf23780",
sha256 = "2ec90dd7f152417825d77ee6f4221060a04be5f9573fd4588e8ccc5394d91e56",
strip_prefix = "github.com/cockroachdb/[email protected]20230202171745-e9d3bb388ad6",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230131225459-7540fdf23780.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230202171745-e9d3bb388ad6.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/google-api-go-client/com_github_cockroachdb_google_api_go_client-v0.80.1-0.20221117193156-6a9f7150cb93.zip": "b3378c579f4f4340403038305907d672c86f615f8233118a8873ebe4229c4f39",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20230118201751-21c54148d20b.zip": "ca7776f47e5fecb4c495490a679036bfc29d95bd7625290cfdb9abb0baf97476",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230131225459-7540fdf23780.zip": "10635b775b3be21b36e4a2594db1026246dacb826f9717e38450f110faca593f",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230202171745-e9d3bb388ad6.zip": "2ec90dd7f152417825d77ee6f4221060a04be5f9573fd4588e8ccc5394d91e56",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.3.zip": "7778b1e4485e4f17f35e5e592d87eb99c29e173ac9507801d000ad76dd0c261e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/sentry-go/com_github_cockroachdb_sentry_go-v0.6.1-cockroachdb.2.zip": "fbb2207d02aecfdd411b1357efe1192dbb827959e36b7cab7491731ac55935c9",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ require (
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
github.com/cockroachdb/gostdlib v1.19.0
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b
github.com/cockroachdb/pebble v0.0.0-20230131225459-7540fdf23780
github.com/cockroachdb/pebble v0.0.0-20230202171745-e9d3bb388ad6
github.com/cockroachdb/redact v1.1.3
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
github.com/cockroachdb/stress v0.0.0-20220803192808-1806698b1b7b
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ github.com/cockroachdb/gostdlib v1.19.0/go.mod h1:+dqqpARXbE/gRDEhCak6dm0l14AaTy
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/pebble v0.0.0-20230131225459-7540fdf23780 h1:cPiiouYJWWpaqnWzr7LPnHlS5m38Q184wr3PY4DBX88=
github.com/cockroachdb/pebble v0.0.0-20230131225459-7540fdf23780/go.mod h1:aTUOWxjt8RcnlEANMlnkJoRJ5TBiBs+p1v1OJWrEXGU=
github.com/cockroachdb/pebble v0.0.0-20230202171745-e9d3bb388ad6 h1:CM8nnTeBpEXqf0KobrrFj7B1peUmahHTinYfm7DVuOw=
github.com/cockroachdb/pebble v0.0.0-20230202171745-e9d3bb388ad6/go.mod h1:aTUOWxjt8RcnlEANMlnkJoRJ5TBiBs+p1v1OJWrEXGU=
github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd h1:KFOt5I9nEKZgCnOSmy8r4Oykh8BYQO8bFOTgHDS8YZA=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ const NodeLocalityColumn: React.FC<{ record: NodeStatusRow }> = ({
);
};

const formatWithPossibleStaleIndicator = (
text: string,
record: NodeStatusRow,
): string => {
if (
record.status === LivenessStatus.NODE_STATUS_DEAD ||
record.status === AggregatedNodeStatus.DEAD
) {
return `${text} (stale)`;
}

return text;
};

/**
* LiveNodeList displays a sortable table of all "live" nodes, which includes
* both healthy and suspect nodes. Included is a side-bar with summary
Expand Down Expand Up @@ -268,6 +282,7 @@ export class NodeList extends React.Component<LiveNodeListProps> {
{
key: "uptime",
dataIndex: "uptime",
render: formatWithPossibleStaleIndicator,
title: <UptimeTooltip>Uptime</UptimeTooltip>,
sorter: true,
className: "column--align-right",
Expand All @@ -277,6 +292,7 @@ export class NodeList extends React.Component<LiveNodeListProps> {
{
key: "replicas",
dataIndex: "replicas",
render: formatWithPossibleStaleIndicator,
title: <ReplicasTooltip>Replicas</ReplicasTooltip>,
sorter: true,
className: "column--align-right",
Expand All @@ -290,7 +306,10 @@ export class NodeList extends React.Component<LiveNodeListProps> {
</NodelistCapacityUsageTooltip>
),
render: (_text: string, record: NodeStatusRow) =>
util.Percentage(record.usedCapacity, record.availableCapacity),
formatWithPossibleStaleIndicator(
util.Percentage(record.usedCapacity, record.availableCapacity),
record,
),
sorter: (a: NodeStatusRow, b: NodeStatusRow) =>
a.usedCapacity / a.availableCapacity -
b.usedCapacity / b.availableCapacity,
Expand All @@ -301,7 +320,10 @@ export class NodeList extends React.Component<LiveNodeListProps> {
key: "memoryUse",
title: <MemoryUseTooltip>Memory Use</MemoryUseTooltip>,
render: (_text: string, record: NodeStatusRow) =>
util.Percentage(record.usedMemory, record.availableMemory),
formatWithPossibleStaleIndicator(
util.Percentage(record.usedMemory, record.availableMemory),
record,
),
sorter: (a: NodeStatusRow, b: NodeStatusRow) =>
a.usedMemory / a.availableMemory - b.usedMemory / b.availableMemory,
className: "column--align-right",
Expand Down

0 comments on commit 18fda97

Please sign in to comment.