Repository navigation
Release lease and SQLite descriptors when a project closes; recover the heartbeat after a malformed read - #1012
Queued
aft-alfonso[bot] wants to merge 4 commits into
Queued
aft-alfonso[bot] wants to merge 4 commits into
aft-alfonso[bot] wants to merge 4 commits into
Conversation
Read-only applicability workers do not need storage ownership leases. Remove those runtime references from their detached configuration snapshots so releasing the last context closes both lock files and pinned directories synchronously. Return malformed lease reads as transient errors after retiring the kept descriptor. The next scheduled beat reopens the live path, without a production-length retry sleep or a false NotOwner timeout. Healthy beats still reuse descriptors. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 9dc3819128fb1664fe28285693dc2adce8a197b5)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 36385a361b06af3bb56fd6296c4e21dd99394134)
Standing startup reconciliation opens aft.db on its worker. Dropping only the request sender detached a pass that could retain the owning SQLite connection beyond module-loop teardown and fixture storage deletion. Disconnect requests, discard queued passes, and join the active pass so the connection closes through its owner. This pre-existing lifetime began with detached StandingWorker in cc427d9 and startup reconciliation offload in 4796341, before #988. Runtime tracing established the opener; no separate DB, WAL, SHM, or journal descriptor is opened or inspected for cleanup. Add a controlled connection-owning worker regression and Linux descriptor census. Final linux,2c checks passed: 61 fs_lock, 3 applicability, 20 standing tests, plus 20/20 exact fixture-census repetitions. Windows tests cross-compile with warnings denied. Native macOS passes 59 fs_lock tests and the SQLite-owner regression; lease acquisition setup is denied in this environment, including the unchanged pre-existing lease test. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> (cherry picked from commit 5734383baf74b9622c0cc6c1524950133b571030)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
ualtinok
added this pull request to the merge queue
Oct 26, 2026
Any commits made after this event will not be merged.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the descriptor census failure on main (subc::tool_result_tests::tool_result_fixtures_release_descriptors, which knocked out the #984 merge group) and a heartbeat regression from #988.
Tests: applicability_walk_does_not_retain_released_storage_leases, released_lease_closes_all_descriptors_synchronously, malformed_beat_reopens_atomic_replacement_on_next_beat, standing_worker_drop_waits_for_owned_sqlite_connection. The census test passed 20 of 20 runs on Linux after the fixes.