forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lease: fix goroutine starvation caused by test cluster setting
When a test overrides sql.catalog.descriptor_lease_duration to 0, then it was possible for the test to starve itself by creating a timer with zero duration that is repeatedly reset. The bug occurred since after refreshTimer expired, it would call the jitteredLeaseDuration helper to get the new duration for the timer. If a test had overriden sql.catalog.descriptor_lease_duration to 0, this would cause the timer to keep being reset to 0 and starve other goroutines. Release note: None
- Loading branch information
Showing
2 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters