cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30k stars 3.79k forks source link

webui: show protected timestamps in DB Console #103831

Open erikgrinaker opened 1 year ago

erikgrinaker commented 1 year ago

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:

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

irfansharif commented 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.

kevin-v-ngo commented 1 year ago

Related issue: https://github.com/cockroachdb/cockroach/issues/96552

kevin-v-ngo commented 1 year ago

98540

Nice!!

erikgrinaker commented 1 year ago

Ah, my bad, should've searched better.