Repository navigation
perf(onlion): the fold runs after the response - #132
Merged
Merged
Conversation
Measured against the deployed build in a concurrency-16 Add burst (2026-10-30 14:09-14:15): five requests died at the 120 s ceiling and every one of them was in foldPending; ordinary Adds ran 11-25 s with a 40-100 s tail, all waiting for folds riding inside the accept. The 60 s slow-reports showed running:1/waiting:0 - the isolate was not congested; the fold was. The response now comes first. The scheduled trigger and the 20 s budget stay; with an execution that can wait (the Makers Functions EventContext supplies waitUntil - the entry simply never passed it before) the fold starts after the response and the client is gone. A fold killed mid-flight loses one backfill, not a scored attempt: the entry is durable before any fold work and `/admin/fold` still drains what remains. Callers without waitUntil keep the budgeted inline fold; NMG_FOLD_INLINE=1 pins it for determinism. Also corrected this round: the accept-without-cas record claimed the entry never receives an execution context. Both documented EdgeOne function models carry waitUntil (the Edge Functions FetchEvent, and the Makers handler EventContext); the entry never destructured it, which also left the opt-in shared failure history permanently off. That claim is superseded here. Recorded in docs/decisions/implemented/2026-10-30-fold-runs-after-the-response.*
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.
What
Not verified
Not verified against the deployed build yet (local 37 PASS). No burst has been repeated post-deploy. The provider 19-24 s document calls under burst are intentionally out of scope (documented in the record).