docs(runtime): define retiring worker drain contract - #1085
Conversation
There was a problem hiding this comment.
Pull request overview
Documents the scheduler’s asynchronous retire-and-drain behavior during pool shrink.
Changes:
- Defines logical versus physical worker accounting during retirement.
- Documents unbounded drain risks, slot-reuse waits, and shutdown escape paths.
- Corrects scheduler API comments and release notes.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
wiki/Performance-Tuning.md |
Explains resize responsiveness and metrics. |
wiki/Core-Concepts.md |
Defines the retirement lifecycle. |
wiki/API-Reference.md |
Clarifies public scheduler API semantics. |
wiki/API-Contracts.md |
Adds the resize responsibility contract. |
include/elio/runtime/scheduler.hpp |
Corrects public and internal comments. |
CHANGELOG.md |
Records the clarified contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
68d808f to
c58a466
Compare
|
@copilot Please review the updated current head only. |
Reviewed the current head (
One cosmetic note: in No inconsistencies or incorrect statements found. |
|
@copilot Please review the updated current head only after the paragraph-separation fix. |
Current head ( |
b7e5f64 to
291e530
Compare
|
@copilot please re-review only; do not make direct code modifications. |
Re-reviewed both commits at current head (
No inconsistencies or inaccurate statements found. |
Description
Document the scheduler's existing retire-and-drain resize contract. A shrink
publishes the smaller logical scheduling range without waiting for removed
workers to finish draining their worker-local I/O; the previous public wording
could be read as a synchronous physical-thread stop.
Type of Change
Related Issues
Closes #1079
Changes Made
Core Changes
num_threads()as the logical scheduling range during retirement.active_tasks()andpending_tasks()continue to account for draining workers.API Changes (if applicable)
None. This documents the existing implementation and responsibility boundary.
Migration Guide (if breaking change)
Not applicable.
Testing
Unit Tests
Documentation and comments only; no runtime behavior changed, so the code test
suite was not rebuilt.
Integration Tests
Sanitizer Testing
Test Results
Checklist
Code Quality
Documentation
Testing
Compatibility
Performance (if applicable)
Screenshots / Diagrams
Not applicable.
Additional Notes
This PR intentionally does not add a retirement deadline. A fixed deadline
would allow a worker to stop polling operations that are still owned by its I/O
context and could orphan otherwise valid long-running I/O.
Reviewer Guidance
Areas requiring special attention:
Questions for reviewers: