Repository navigation
Keep SQLite claim and acknowledgment waits inside their retry budgets - #838
Merged
Merged
Conversation
|
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.



The published four-worker follow-through in #837 completes all callbacks exactly
once, but its diagnostic original retains a failed Laravel delivery after real
SQLite error 5 at the initial activity-claim writer admission. The original root
rolled back before any callback. This is distinct from the published summary
correction in #835 and does not establish a historical shared cause.
SQLite's normal 5,000 ms busy timeout can consume the helper's complete existing
five-second admission budget in one call, leaving no bounded root retry. The new
real two-PDO regression covers workflow and activity claims with shared and
separate application storage. Its competing writer releases only after the
original root rollback is independently observed.
The correction bounds individual admission waits to at most 100 ms within the
existing total budget and restores the connection setting before entering the
operation, also restoring it on refusal. It preserves
the root/PDO rollback proof, body-once semantics, original claims/deadlines, nested
and non-SQLite behavior, uncertain commit/rollback refusal, and callback outcomes.
No repair-policy or clean-consumer assertion relaxation, version, schema or
Server/shared/native change is included. All earlier failed originals retain
their outcomes.
The exact-parent counterfactual fails all four new real two-PDO controls
(4 failures / 28 assertions), each retaining one failed Laravel job before claim.
The correction passes all four unchanged controls (4 tests / 68 assertions),
with one first-attempt callback and completion, zero repairs or failed jobs,
preserved history/deadlines and the original 5,000 ms connection setting restored.
The admission implementation also passes all 70 focused transaction, embedded
task and projection controls (1,027 assertions). The subsequent specific
admission-setting refusal and its unit suite pass 28 tests / 126 assertions,
with ECS fix followed by a clean check and PHPStan passing. Source CI remains
pending. The previous hosted formatting failure is preserved and corrected.
Sonar's new generic-exception finding was addressed with a specific
SqliteWriteWaitException, rather than changing its rule or threshold; freshanalysis must confirm resolution.
The existing outcome test still holds a genuine writer for over five seconds
within the original claimed outcome deadline. Its release now follows that
elapsed boundary across short waits, so it continues to prove that the callback
runs once and an already executed outcome can outlive the ordinary admission
budget without renewing its original claim.
A separate source four-worker original
01m55rw0a6cpfdz9tj2fh4v22hon PHP 8.5.6 /SQLite 3.51.2 completes all 64 first-attempt callbacks and preserves typed output,
prefix and original deadlines, with zero failed jobs. It nevertheless FAILS
the unchanged clean guard: one reserved-row repair and one reserved transport row
remain after a real SQLite5 at the original fenced acknowledgment DELETE.
This is a newly identified retry-budget boundary in that existing acknowledgment
helper, not a successful clean-consumer run or a callback failure. Its transaction
has rolled back and no commit uncertainty is inferred. Two new two-PDO controls
will reproduce that specific acknowledgment boundary before correction. The
conditional reservation fence and refusal of uncertain acknowledgments remain
required. Original failed records are not relabeled.
Both new acknowledgment controls fail on the prior queue implementation
(2 errors / 6 assertions). The correction shares the bounded driver-wait scope
with the existing fenced DELETE, while retaining that helper's independent
five-second / 64-attempt limits and original root/PDO/SQL/bindings proof. Nested
and non-SQLite acknowledgments retain their previous path. The handler is never
rerun. All 42 acknowledgment and transaction controls now pass (202 assertions),
including changed reservations, changed PDO, constraints and uncertain commit or
rollback refusals. ECS and PHPStan pass. A new four-worker original and fresh
whole-source qualification remain required.
Final source
46d620eapasses a new four-worker original01m55s3z50frt10e5hfbc957xtunder the unchanged 2-CPU / 2-GiB / no-swap limits:64 exact first-attempt callbacks/activities, 66 completed tasks, one workflow
completion, original prefix/deadlines and exact typed output. Repairs, failed
jobs, remaining deliveries and delivery exceptions are all zero. All four real
worker roles finish and the original 90-second observer passes. The captured
pre-update repair intents do not become durable repairs. This is PHP 8.5.6 /
SQLite 3.51.2 source acceptance, separate from the stock hosted PHP 8.3 published
consumer. No installed 2.5.32 claim is made. No acceptance assertion was relaxed.
Sonar's subsequent complexity report is addressed by a private conditional-write
method, leaving the complete rollback proof together. That extraction passes all
14 acknowledgment controls / 76 assertions, ECS and PHPStan. Final source
a3770d77is awaiting its normal PR checks. Fresh Sonar analysis and the appcheck pass, with zero OPEN or CONFIRMED issues and both S112 and S3776 explicitly
CLOSED/FIXED. No rule, threshold or exclusion was changed. The earlier full
56fc1d86run has passing database shards, coverage and five actual SQLiteupgrade profiles, but its formatting failure and failed aggregate remain.
Those component results do not qualify the final whole tree. Exact automatic
main qualification is required after merge and before publication. Compatible
stable candidate #839 has identical affected runtime/tests and its own full
qualification, separately from published consumer #837.
Merged at
8f55cdfbwith identical whole tree8f74fa2fand exact parentsd463158b/a3770d77. All applicable final PR checks pass. The remote mergedhead is absent. Automatic fresh-main 39068134874 is pending and will qualify
that exact merge before publication. Normal installed 2.5.31 also independently
reproduces all six controls (four failures / two errors / 34 assertions), with
all 937 installed runtime/resource files matching its immutable release.