Make the sidecar a dumb versioned proxy: drop request tracking, gating, and quiesce#10
Open
jvmncs wants to merge 1 commit into
Open
Make the sidecar a dumb versioned proxy: drop request tracking, gating, and quiesce#10jvmncs wants to merge 1 commit into
jvmncs wants to merge 1 commit into
Conversation
…ing, and quiesce Co-Authored-By: jason.mancuso@modal.com <jvmncs@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
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
The sidecar tracked in-flight requests (
_active_requests,_exact_inflight) behind a_committingadmission gate to support two commit modes. This was brittle (aClientDisconnectcould leak the counter and wedge aquiescecommit forever) and, in the deployment we actually run, dead weight: every trainer config commitsin_placeand gates requests withweight_version_mode="min"(neverexact), so_commit_readynever waits on any count. This collapses the sidecar to a single in-place path and removes all request tracking.What stays (these were never "tracking" — they carry no shared state and are unaffected by disconnect drift): the 409 min/exact
WeightVersionPolicycheck,start_versioncapture, version-namespacedextra_keystamping, responseweight_version_start/endmetadata, and rid-injection + client-disconnect/abort_request.What goes: the
RolloutAdmissionGateclass,CommitMode/quiesce, the counters, the_committinggate, and the exact-pin draining. There is now one commit path:on_appliedstill advancescurrent_versionbeforeresume()(new admissions see the new namespace first), and a failedapply()still leaves the version unchanged and resumes the engine.request_contextis now stateless — it validates the policy (still callingqueue_syncon aWeightVersionNotReadyso a lagging replica pulls forward) and yieldscurrent_version, with no lock/counter/finally.Because commits no longer drain, the quiesce-only
flush_cacheis gone (removed fromEngineAdapter, the SGLang adapter, and the_sync_oncepath); the reload payload keeps"flush_cache": False.server_info()drops thecommit_mode/active_requests/inflight_exact_versionsfields.Trade-off:
exact_versionrequests still get a correct 409 on mismatch, but are no longer guaranteed to be served wholly on version v if an in-place commit lands mid-decode (the tail decodes on v+1;extra_keyisolates the prefix cache, not decode continuation). No shipped config usesexact;min-staleness + "cross commits freely" is the documented async stance.Cookbook: removed the
commit_mode/--commit-mode/SIDECAR_COMMIT_MODE/COMMIT_MODE/STITCH_SHIM_COMMIT_MODEknobs from the sidecar/provider/process/helper launch paths and configs; updated README/docstrings to describe the single in-place path.Testing
uv run pytest— 112 passeduv run ruff check .— cleanLink to Devin session: https://modal.devinenterprise.com/sessions/9847754de05e4e94bc99199825a47c15
Requested by: @jvmncs