Open tbg opened 1 year ago
cc @cockroachdb/replication
https://github.com/cockroachdb/cockroach/issues/99464#issuecomment-1486825371 is another issue where this metric would be something I'd check if it existed.
Hi @tbg ! I am Anuj Diwan, a Computer Science PhD student at UT Austin. I am part of a team along with @arjunrs1 (Arjun Somayazulu) and we're taking a graduate Distributed Systems course. For our course project, we are interested in contributing to CockroachDB. This issue is related to our course material. Could we work on this issue? Any pointers for us to get started would be appreciated as well.
Thanks and regards, Anuj.
Hi @ajd12342, thank you for reaching out.
Have you already contributed to CRDB? If not, consider starting from this guide.
As for this issue, you could maybe start by looking at the pkg/kv/kvserver/metrics.go file which defines a bunch of metrics. In this issue we are intrested in having something like the "raft.unstable_bytes"
metric in the draft PR that is referred to in the issue description.
Then look where and how it's incremented, and try to replicate some of that (we would need it to be more polished than in that PR though).
If you're looking to understand what's behind this metric, it's the raft's unstable part of the log which sits in memory.
Let us know where this leads you, and what questions you will have.
This was hacked together in #98576 but it's generally useful.
Jira issue: CRDB-26076
Epic CRDB-39958