cockroach
cockroach copied to clipboard
catalog/lease: add metrics for tracking long lease waits
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
@rafiss TFTR!
bors r+