Skip to content

Fix flaky lease expiry test - #111

Merged
asg0451 merged 1 commit into
masterfrom
cursor/fix-flaky-lease-expiry-test-9bcb
Sep 14, 2025
Merged

Fix flaky lease expiry test#111
asg0451 merged 1 commit into
masterfrom
cursor/fix-flaky-lease-expiry-test-9bcb

Conversation

@asg0451

@asg0451 asg0451 commented Sep 14, 2025

Copy link
Copy Markdown
Owner

Add a guard to the lease sweeper to prevent expiring extended leases due to stale expiry index entries.

The expire_due_leases function could incorrectly expire a lease that had been extended. This happened if a stale expiry index entry (pointing to an old, past expiry time) was processed before the lease's actual entry (which had been updated with a new, future expiry). The guard checks the lease's true expiry time and, if it's in the future, only deletes the stale index key, resolving the race condition and fixing the flaky extend_existing_lease_updates_expiry_index test.


Open in Cursor Open in Web

Co-authored-by: miles.frankel <miles.frankel@gmail.com>
@cursor

cursor Bot commented Sep 14, 2025

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@asg0451
asg0451 marked this pull request as ready for review September 14, 2025 22:27
@asg0451
asg0451 merged commit 732f8b3 into master Sep 14, 2025
1 of 2 checks passed
@asg0451
asg0451 deleted the cursor/fix-flaky-lease-expiry-test-9bcb branch September 14, 2025 22:27
@github-actions

Copy link
Copy Markdown

Criterion benchmarks delta (ms; lower is better)

Benchmark PR (ms) Master (ms) Δ (ms) Δ (%)
e2e_rpc/rpc_add_batch_200 0.621 0.609 0.012 +2.0%
e2e_rpc/rpc_poll_batch_200 50.741 51.928 -1.187 -2.3%
e2e_rpc/rpc_remove_each_200 24.688 24.758 -0.070 -0.3%
e2e_rpc/rpc_stress_like_p2_a2_items_200 1170.986 1202.766 -31.780 -2.6%
storage_add/add_available_500 8.153 8.295 -0.142 -1.7%
storage_poll/get_next_available_entries_500 10.115 10.528 -0.413 -3.9%
storage_remove/remove_in_progress_500 20.242 20.622 -0.380 -1.8%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants