Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: deflake TestRebalancingAndCrossRegionZoneSnapshotMetrics
The test ensures the snapshot byte metrics are correct by measuring the size of the snapshot right before it's sent to a learner. It is possible that a lease upgrade races with this calculation, so the expected snapshot size is wrt an expiration lease, while the snapshot size recorded by the metrics is wrt a leader lease. This may result in a different snapshot sizes (e.g. because leader leases do not set the DeprecatedStartStasis field). This commit ensures the test waits for a lease upgrade before measuring the snapshot size. Fixes: #137249 Release note: None
- Loading branch information