forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: improve test utilities for lease info
The TestServer/TestCluster have facilities for querying a range's lease. This patch addresses two problems with this functionality: 1) If the node being queried has a lease proposal in flight, the respective functions would return it at the detriment of the current lease. This behavior is dubious, and indeed not what a test that I'm writing wants. This patch adds a function that returns both the current and the prospective next lease. 2) The functions let you ask for the state of a particular node to be queried. This was buggy, though, because the LeaseInfoRequest could be transparently forwarded to a different node in case the queried node doesn't have a replica or has a learner replica. That's confusing as hell. This patch optionally dissallows that, giving the caller confidence that they got the state from the node it was interested in. Release note: None
- Loading branch information
1 parent
4a31ade
commit 5f2c296
Showing
6 changed files
with
734 additions
and
548 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
Oops, something went wrong.