cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

catalog/lease: add metrics for tracking long lease waits

Open fqazi opened this issue 1 year ago • 1 comments

Previously, we had no way of knowing if WaitForOneVersion, WaitForNoVersion, or CheckTwoVersionInvariant, which wait for leases to expire are stuck. This becomes more problematic as we added migration to session-based leasing. If something goes wrong during this migration, there is a danger of schema changes hanging while waiting for leases to expire. To address this, this patch will add new metrics for detecting long waits in these code paths

Fixes: #119209

Release note: None

fqazi avatar Feb 23 '24 18:02 fqazi

This change is Reviewable

cockroach-teamcity avatar Feb 23 '24 18:02 cockroach-teamcity

@rafiss TFTR!

fqazi avatar Mar 05 '24 19:03 fqazi

bors r+

fqazi avatar Mar 05 '24 20:03 fqazi

Build succeeded:

craig[bot] avatar Mar 05 '24 21:03 craig[bot]