-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kvserver: Expose Bytes Written to WAL #104890
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
WAL.BytesWritten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a graph for it. Grep for cr.store.rocksdb.flushed-bytes
in storage.tsx
and add a similar graph.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @RahulAggarwal1016)
pkg/kv/kvserver/metrics.go
line 2017 at r1 (raw file):
} metaWalBytesWritten = metric.Metadata{
nit: capitalize as WAL
since WAL is an acronym.
https://github.com/golang/go/wiki/CodeReviewComments#initialisms
pkg/kv/kvserver/metrics.go
line 2022 at r1 (raw file):
Measurement: "Events", Unit: metric.Unit_COUNT, }
let's add a metric for Metrics.WAL.BytesIn
too
pkg/kv/kvserver/metrics.go
line 2260 at r1 (raw file):
RaftStorageReadBytes *metric.Counter // WAL even metrics
typo?
pkg/kv/kvserver/metrics.go
line 2261 at r1 (raw file):
// WAL even metrics WalBytesWritten *metric.Gauge
nit: capitalize as WAL
since WAL is an acronym.
https://github.com/golang/go/wiki/CodeReviewComments#initialisms
pkg/kv/kvserver/metrics.go
line 2827 at r1 (raw file):
// WAL metrics WalBytesWritten: metric.NewGauge(metaWalBytesWritten),
nit: no need to separate into a distinct block, can include with the above block of all storage metrics.
e68a36c
to
2b1fe00
Compare
2b1fe00
to
1ba4675
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)
pkg/kv/kvserver/metrics.go
line 2017 at r1 (raw file):
Previously, jbowens (Jackson Owens) wrote…
nit: capitalize as
WAL
since WAL is an acronym.https://github.com/golang/go/wiki/CodeReviewComments#initialisms
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)
pkg/kv/kvserver/metrics.go
line 2022 at r1 (raw file):
Previously, jbowens (Jackson Owens) wrote…
let's add a metric for
Metrics.WAL.BytesIn
too
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)
pkg/kv/kvserver/metrics.go
line 2260 at r1 (raw file):
Previously, jbowens (Jackson Owens) wrote…
typo?
yup that was a typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)
pkg/kv/kvserver/metrics.go
line 2261 at r1 (raw file):
Previously, jbowens (Jackson Owens) wrote…
nit: capitalize as
WAL
since WAL is an acronym.https://github.com/golang/go/wiki/CodeReviewComments#initialisms
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)
pkg/kv/kvserver/metrics.go
line 2827 at r1 (raw file):
Previously, jbowens (Jackson Owens) wrote…
nit: no need to separate into a distinct block, can include with the above block of all storage metrics.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens and @RahulAggarwal1016)
pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/storage.tsx
line 236 at r3 (raw file):
<LineGraph title="WAL Bytes In"
Not sure the "bytes in" metric is useful enough for a graph, it's up to @jbowens. I think having both would just raise questions from users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @RaduBerinde)
pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/storage.tsx
line 236 at r3 (raw file):
Previously, RaduBerinde wrote…
Not sure the "bytes in" metric is useful enough for a graph, it's up to @jbowens. I think having both would just raise questions from users.
agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens and @RaduBerinde)
pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/storage.tsx
line 236 at r3 (raw file):
Previously, jbowens (Jackson Owens) wrote…
agreed
should I remove all the 'byte in' changes or just the graph? Does every time series metric need a graph in order to show up?
just the graph
a time series metric without a graph in the DB Console will still be exported (eg, to prometheus) and may be graphed on demand using the custom chart tool. |
1ba4675
to
c2ca0c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, change made!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jbowens and @RaduBerinde)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @jbowens)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a command I can use to format the .tsx file? I think it fails linting
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @jbowens and @RaduBerinde)
This change exposes the `WAL.BytesWritten` and `WAL.BytesIn` metric from Pebble to the Cockroach Side. Fixes: cockroachdb#104531 Release note: None
c2ca0c2
to
b485fd9
Compare
bors r+ |
Build succeeded: |
This change exposes the
WAL.BytesWritten
WAL.BytesIn
metric from Pebble to the Cockroach Side. Proto changes seemed to have been made previously:cockroach/pkg/util/log/eventpb/storage_events.proto
Lines 113 to 114 in e68a36c
Fixes: #104531
Release note: None