HW-13: make SQLite contention policy explicit#144
Closed
skylarbpayne wants to merge 4 commits into
Closed
Conversation
Owner
Author
|
Closing unmerged under the frozen Disposition C gate. The sole final Palmer SR at d8d7e5f found that macOS filesystem detection uses BSD |
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.
Summary
sqlite.lock_retryand re-check the usable lease budget before every additional SQLite operationsqlite.lock_recoveredfrom v1; the durable retry record plus the normal result is the recovery traceFrozen v1 contract
The lease budget controls whether a retry may begin. After a known BUSY/LOCKED failure,
run_with_lock_retry()emitssqlite.lock_retry, applies bounded jitter/sleep, re-reads monotonic time immediately before another operation, and starts it only whenelapsed_ms + busy_timeout_ms <= lease_budget_ms. Failed admission durably emitssqlite.lock_exhaustedand raises without another operation.The operation callable is one bounded SQLite unit using the configured busy timeout and owns domain idempotency. Once an admitted operation returns normally, its result is authoritative. V1 does not promise wall-clock completion/publication within the lease budget and does not emit
sqlite.lock_recovered; those semantics require a separately specified transaction-aware successor.TDD and verification
sqlite.lock_recoveredstill emitted and late admitted success translated to exhaustion)20 passed in 0.25s20 passed in 0.27swrittenresult, one or more durablesqlite.lock_retryrecords, exactly one target writewrittenresult, one or more durablesqlite.lock_retryrecords, exactly one target write649 passed, 1 skipped in 35.01s648 passed, 2 skipped in 29.52sedb753f16920807120362d9570cc5a75da70b113c24d4ab0daccc05e44837634.hermes/showcase-artifacts/**unchangedAncestry and scope
d8d7e5f4a97a672d2e1b35de4ac2a0318bf5d0df4674210f67d6d8ab4cf86abeb9ae330124c75294remains an ancestor583459d3ee36dae63f89dbd87d175f91b53ec39dand FND-OP2727a46b1a799a4a2125d3b85e292db514f1fb98remain ancestorsfc9eb5ae0797c5cbdfcf51d6b9be551e6ba85331is not an ancestorOperational boundary
No merge, install, deploy, live registry/database/profile mutation, service restart/reconfiguration, cron change, or external side effect was performed.
Do not merge. This immutable head requires exactly one fresh Palmer-only SR, then only on SR PASS one separate fresh Palmer-only QR at the same head.