-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kv/kvserver: TestLeaseQueueProactiveEnqueueOnPreferences failed #124693
Comments
The lease hits this unexpected error when attempting to switch the lease type in pre-processing by the lease queue:
The lease does actually transfer later, right before the test shuts down the cluster:
This is potentially related to #124223, which merged two weeks prior. |
Actually, the error is from: cockroach/pkg/kv/kvserver/replica_range_lease.go Lines 553 to 554 in a7aad51
Which was was added in #123442. Not having looked much deeper, this appears like a case we may have permitted previously but do not now. cc @nvanbenschoten. |
We suspect that this is the cause of the test failure in cockroachdb#124693. Addresses a TODO added in 1dc18df. Release note: None
kv/kvserver.TestLeaseQueueProactiveEnqueueOnPreferences failed on master @ bd4c5fd7c65c0a9afa8ba05675e49747a4f68881:
Parameters:
Same failure on other branches
|
We suspect that this is the cause of the test failure in cockroachdb#124693. Addresses a TODO added in 1dc18df. Release note: None
124885: kv: retry liveness heartbeat on race with insufficient expiration r=nvanbenschoten a=nvanbenschoten Fixes #124693. Fixes #125287. This commit adds logic to retry the synchronous liveness heartbeat which ensures that the liveness record has a later expiration than the prior lease by the time the lease promotion goes into effect, which was added in #123442. This heartbeat may need to be retried because it may have raced with another liveness heartbeat which did not extend the liveness expiration far enough. We opt to allow this race and retry across it instead of detecting it and returning an error from `NodeLiveness.Heartbeat` because: 1. returning an error would have a larger blast radius and could cause other issues. 2. returning an error wouldn't actually fix the tests that are failing, because they would still get an error, just a different one. Before this commit, `TestLeaseQueueProactiveEnqueueOnPreferences` would hit this case fail under deadlock and stress every ~150 iterations. After this commit, the test passes continuously under deadlock stress for over 2000 runs. This makes #123442 even uglier. The nicer solution is #125235, but that is not backportable. Still, we're planning to address that issue as part of the leader leases work, so this is a temporary fix. This also removes a TODO added in 1dc18df. As mentioned above, we don't address it, but instead document the behavior. Release note (bug fix): resolves a concerning log message that says "expiration of liveness record ... is not greater than expiration of the previous lease ... after liveness heartbeat". This message is no longer possible. 125309: streamingccl: fix metric name r=msbutler a=stevendanna This metric was re-using the name of another metric. Epic: none Release note: None 125369: streamproducer: add emit_wait and produce_wait to vtable r=rickystewart a=dt Release note: none. Epic: none. 125411: streamingccl: cleanup unit test terminology r=stevendanna a=stevendanna Mixing source/target with serverA/serverB was a bit confusing. Epic: none Release note: None Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com> Co-authored-by: Steven Danna <danna@cockroachlabs.com> Co-authored-by: David Taylor <tinystatemachine@gmail.com>
Fixes #124693. Fixes #125287. This commit adds logic to retry the synchronous liveness heartbeat which ensures that the liveness record has a later expiration than the prior lease by the time the lease promotion goes into effect, which was added in #123442. This heartbeat may need to be retried because it may have raced with another liveness heartbeat which did not extend the liveness expiration far enough. We opt to allow this race and retry across it instead of detecting it and returning an error from `NodeLiveness.Heartbeat` because: 1. returning an error would have a larger blast radius and could cause other issues. 2. returning an error wouldn't actually fix the tests that are failing, because they would still get an error, just a different one. Before this commit, `TestLeaseQueueProactiveEnqueueOnPreferences` would hit this case fail under deadlock and stress every ~150 iterations. After this commit, the test passes continuously under deadlock stress for over 2000 runs. This makes #123442 even uglier. The nicer solution is #125235, but that is not backportable. Still, we're planning to address that issue as part of the leader leases work, so this is a temporary fix. This also removes a TODO added in 1dc18df. As mentioned above, we don't address it, but instead document the behavior. Release note (bug fix): resolves a concerning log message that says "expiration of liveness record ... is not greater than expiration of the previous lease ... after liveness heartbeat". This message is no longer possible.
kv/kvserver.TestLeaseQueueProactiveEnqueueOnPreferences failed on master @ b5081e997adaf5950c9b85dfb6655f226bf16d29:
Parameters:
attempt=1
deadlock=true
run=3
shard=22
Help
See also: How To Investigate a Go Test Failure (internal)
Same failure on other branches
This test on roachdash | Improve this report!
Jira issue: CRDB-39013
The text was updated successfully, but these errors were encountered: