Skip to content

[Server][DynamicAdmission] Add atomic runtime enable/disable control - #330

Merged
SunSi12138 merged 233 commits into
devfrom
issue-329-runtime-admission-toggle
Aug 27, 2026
Merged

SunSi12138 merged 233 commits into
devfrom
issue-329-runtime-admission-toggle

Conversation

@SunSi12138

@SunSi12138 SunSi12138 commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Implements #329 as a stacked change on #328.

Stack base (latest reviewed #328 exact head): 21a3ebef8e05b97dffd49cc13c5cf1209153d657
Base branch: issue-324-admission-state-kernel
Final implementation head: c1c68580e3337bf640c5c677cce829cae592f423

Scope:

  • add Server-package public runtime enable/disable extension methods without introducing Abstractions -> Server dependency
  • centralize publication/lifecycle writer behavior for public control and existing test publication seams
  • preserve request capture, retire/reclaim, compatible stable-kernel state, and ResourceGovernor independence
  • add deterministic transaction/race/request-lifecycle coverage
  • document supported runtime transitions and semantics

This PR intentionally does not add enabled-to-enabled policy updates, resize/migration APIs, dynamic module redesign, Hosting/IOptionsMonitor integration, or ResourceGovernor changes.

#329 DoD / test matrix

Covered by deterministic unit/integration tests and the existing regression suite:

  • public Enable from initially disabled; next-capture boundary; pre-Enable disabled capture remains bypass; unsupported server surface; caller-options isolation
  • public Disable; next requests bypass; active and queued old generation continues; one-way/two-way old queue behavior; idempotent Disable; eventual reclaim
  • compatible Disable -> re-enable overlap for concurrency, queue accounting, rate state and partition state without duplicate kernel registry state
  • transactional configure/validation/resolution failures and partial-construction rollback
  • already-enabled Enable rejection and losing concurrent Enable reclaim
  • deterministic two-Enable, Enable-vs-Disable, Disable-vs-Stop, and candidate-built-vs-Stop writer races
  • repeated enable/disable lifecycle boundedness and no queue/permit underflow
  • Stop seal prevents later publication and final kernel diagnostics drain to zero
  • runtime-disabled Admission remains independent from call capacity / ResourceGovernor
  • capacity-rejected compressed requests keep zero decompression before capacity admission
  • pre-admission stream accounting remains correct across Disable with an old queued generation and rejection leaves the connection reusable
  • existing refactor(server): extract admission state kernel lifecycle #328 AdmissionStateKernel, feat(server): capture admission program generation per request #323 generation-capture, Admission concurrency/queue/rate/partition, and feat(server): budget pre-admission stream buffers in ResourceGovernor #319 pre-admission stream suites remain green

Lifecycle tests assert terminal stable-kernel diagnostics return to zero where applicable: LiveProgramCount=0, RetiredProgramCount=0, RuleStateCount=0, PartitionStateCount=0, QueuedCalls=0, QueuedBytes=0, ActivePermits=0.

Exact-head GitHub Actions evidence

PR Quick run: 32692486306 — success.
PR head: c1c68580e3337bf640c5c677cce829cae592f423.
Actions checkout merge: b07fe7cf1686815834c1386535d662c4391805e0 = final PR head merged onto fixed stacked base 21a3ebef8e05b97dffd49cc13c5cf1209153d657.

  • Formatting: pass
  • Debug build: pass, 0 warnings / 0 errors
  • Release build: pass, 0 warnings / 0 errors
  • Generated assembly dependency verification: pass
  • Unit Tests: 1,134 passed / 0 failed / 0 skipped
  • Generator Tests: 134 passed / 0 failed / 0 skipped
  • Load Test Tests: 60 passed / 0 failed / 0 skipped
  • Integration Tests: 394 passed / 0 failed / 0 skipped
  • Total managed test cases in PR Quick: 1,722 passed / 0 failed / 0 skipped
  • NativeAOT transport/topology/pre-credit smokes: pass
  • Pack + package metadata/symbol/dependency checks: pass
  • Package smoke: pass
  • Oneway demo: pass
  • Load smoke: pass; c=1 18,460.93 qps, c=4 75,071.27 qps, 0 failures
  • Chaos smoke: pass; 763,672 successes, 162,717 injected faults, 0 unexpected, 0 client/server errors, 0 unobserved; retained memory 1,490,960 -> 1,054,688 (-29.26%)

All execution and testing for this implementation was performed through GitHub Actions as requested.

Ready for review. Do not merge automatically; this PR remains stacked on #328.

@SunSi12138
SunSi12138 marked this pull request as ready for review August 24, 2026 05:17

@SunSi12138 SunSi12138 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head c1c68580e3337bf640c5c677cce829cae592f423 against #329/#264 and the reviewed #328 base. No remaining P1/P2 found in this runtime enable/disable slice. Candidate build/publication is transactional and linearizable; losing Enable/Stop races retire unpublished candidates; Disable preserves captured queued/active generations; compatible disable→re-enable overlap reuses the stable kernel without splitting queue/concurrency/rate/partition state; ResourceGovernor/pre-admission ownership remains independent. Exact-head PR Quick 32692486306 is green, including Unit 1134/1134 and Integration 394/394.

SunSi12138 added a commit that referenced this pull request Aug 25, 2026
Base automatically changed from issue-324-admission-state-kernel to dev August 26, 2026 18:14
@SunSi12138
SunSi12138 merged commit b4179cb into dev Aug 27, 2026
25 checks passed
@SunSi12138
SunSi12138 deleted the issue-329-runtime-admission-toggle branch August 27, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant