You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "BigDataDZ (via GitHub)" <gi...@apache.org> on 2026/10/09 04:40:34 UTC

[PR] fix(runtime-host): defer conversation-copy discards to post-ready maintenance [maka]

BigDataDZ opened a new pull request, #6022:
URL: https://github.com/apache/maka/pull/6022

   ## Summary
   
   Startup recovery used to await the physical sidecar purge of preparing conversation copies before the Host could publish Ready. The purge resolves artifact paths across the whole artifact store, so a workspace with a large accumulated store paid an O(all files) syscall sweep on every Host start and blocked readiness for minutes (profile and repro in #4027).
   
   Recovery now only queues the copies it decided to discard:
   
   - The durable headers stay the authority. An entry that never drains (crash before Ready) is re-derived by the next recovery pass, and every reader already treats a preparing copy as inert (root turns reject it, retirement skips it), so a copy visibly preparing for a few extra seconds post-Ready is a state the system already supports.
   - Queued discards drain one admission-leased discard at a time through a new `HostStorageMaintenance` lane (`deferred session discard`), reusing the existing bounded-lane pattern (start after Ready, 100 ms active pacing, exponential backoff, drain/close shutdown semantics).
   - The drain re-reads the header under the Session admission lease, so a copy committed or discarded in the meantime wins over the stale recovery snapshot, and a revision that admitted its first turn in between is committed instead of discarded (same rule as recovery).
   
   This is the readiness half of #4027. The O(store) guard scan inside `preparePurgePathsUnlocked` itself (the other half) is intentionally untouched and can follow separately.
   
   Refs #4027
   
   ## Verification
   
   - `tsc --noEmit` clean in `@maka/runtime-host`; `biome check` clean on the five touched files.
   - New lane test in `storage-maintenance.test.ts`: sweeps at the active pace while the queue reports work, idles once drained.
   - Updated `execution-composition.test.ts` "optional context Store cannot open": recovery no longer attempts the purge (no cleanup diagnostic), the maintenance lane takes the queued discard after Ready and reports retries while this environment cannot complete the purge, and the header stays `preparing`.
   - New composition test "deferred conversation-copy discards drain through post-ready maintenance": a preparing copy survives `recover()` untouched and is fully discarded by the lane after Ready.
   - `session-revision-two-client-uds`, `execution-host-recovery`, `host-kernel`, and the full `execution-composition` suite were run locally on Windows. Three `host-kernel` failures and two `execution-composition` failures (`WorkHub does not record resume...`, `production executor admission discovers...`) reproduce identically on a clean `main` build on this machine and appear unrelated to this change. The full-composition run also showed the node process not exiting after all 46 tests reported, which also predates this branch. The husky pre-commit hook was bypassed (`--no-verify`) because it fails to spawn `biome.cmd` under Node 24 on Windows (EINVAL, `scripts/biome-staged-check.mjs`); the touched files pass `biome check` directly.
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: [ZCode](https://github.com/zai-org/ZCode) (GLM). Read the recovery/purge path and drafted the change and tests; the human contributor reviewed the approach, ran the verification locally, and owns the result. Commits carry `Generated-by: ZCode`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(runtime-host): defer conversation-copy discards to post-ready maintenance [maka]

Posted by "github-actions[bot] (via GitHub) via commits" <co...@maka.apache.org>.
github-actions[bot] closed pull request #6022: fix(runtime-host): defer conversation-copy discards to post-ready maintenance
URL: https://github.com/apache/maka/pull/6022


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(runtime-host): defer conversation-copy discards to post-ready maintenance [maka]

Posted by "github-actions[bot] (via GitHub) via commits" <co...@maka.apache.org>.
github-actions[bot] commented on PR #6022:
URL: https://github.com/apache/maka/pull/6022#issuecomment-6906669482

   <!-- maka-lifecycle:stale-close -->
   This pull request has been closed because it received no new commits during the 7-day grace period. This is not a judgement on the merit of the change; it only keeps the review queue aligned with work that is actively in flight.
   
   The branch and review history are preserved. Push a new commit and reopen the pull request whenever the work is ready to continue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(runtime-host): defer conversation-copy discards to post-ready maintenance [maka]

Posted by "github-actions[bot] (via GitHub) via commits" <co...@maka.apache.org>.
github-actions[bot] commented on PR #6022:
URL: https://github.com/apache/maka/pull/6022#issuecomment-6731687488

   <!-- maka-lifecycle:stale-warning -->
   This pull request has had no new commits for 30 days and has been marked stale. It will be closed in 7 days unless a new commit is pushed.
   
   Comments do not reset this timer: only a new commit does. If the pull request is intentionally long-lived, a maintainer can apply the `pinned` label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org