Open erikgrinaker opened 1 year ago
BTW, https://github.com/cockroachdb/cockroach/pull/98540/ added the oldest PTS record age to the console, right next the MVCC GC graphs.
Related issue: https://github.com/cockroachdb/cockroach/issues/96552
98540
Nice!!
Ah, my bad, should've searched better.
Protected timestamps are used by various subsystems to "lock" MVCC history and prevent it from being garbage collected. For example, incremental backups need this to be able to back up the changes since the previous backup, and changefeeds need this in order to stream the changes that have happened since a changefeed paused or failed.
However, we've often seen such records get left behind indefinitely, such that we didn't run garbage collection for several months, increasing disk usage and reducing scan performance.
We should improve our observability of these protected timestamps. A few ideas:
spanconfig.kvsubscriber.oldest_protected_record_nanos
: the age of the oldest protected timestamp record, in nanosecondsspanconfig.kvsubscriber.protected_record_count
: the number of protected timestamp recordssystem.protected_ts_records
.system.protected_ts_records.meta
).I'll leave it to @irfansharif and cluster observability to flesh out the details here. CDC and DR also have additional information/metrics/data about these protected timestamps, coordinate with them as well.
Jira issue: CRDB-28224