Signed-off-by: yanbao1217 <yanliuwebsite493@gmail.com> Co-authored-by: yanbao1217 <yanliuwebsite493@gmail.com>
This commit is contained in:
1 parent
d278aa8057
commit
ca14e635f5
2 files changed
+11
-5
No files matched your search
@@ -286,8 +286,11 @@ output DuplexOrchestrator._intercept_stage_output -> runner.on_stage_output ->
|
|||||||
detach DuplexOmni.detach_session -> touch(DETACH): engine-owned disconnect grace; expiry -> SessionExpired
|
detach DuplexOmni.detach_session -> touch(DETACH): engine-owned disconnect grace; expiry -> SessionExpired
|
||||||
resume DuplexOmni.resume_session(expected_lease_generation) -> lease CAS; the existing handle is re-entered
|
resume DuplexOmni.resume_session(expected_lease_generation) -> lease CAS; the existing handle is re-entered
|
||||||
close DuplexOmni.close_session -> close RPC; the manager tears the runner down, then the stage cleanup
|
close DuplexOmni.close_session -> close RPC; the manager tears the runner down, then the stage cleanup
|
||||||
(abort submitted requests, release reserved ids), then SessionClosed, then the RPC result: seeing
|
(abort submitted requests, release reserved ids), then SessionClosed, then the RPC result.
|
||||||
the event means the admission slot is free (it is held until the cleanup succeeded)
|
SessionClosed is emitted after the cleanup attempt (in a finally), so it is also sent when the
|
||||||
|
stage cleanup failed; in that case the admission slot is intentionally retained and the cleanup
|
||||||
|
is retried by the reaper, and opening a replacement session can still be refused with
|
||||||
|
resource_exhausted. Seeing the event therefore does not by itself guarantee a free slot.
|
||||||
reap DuplexSessionManager.reaper_loop: idle TTL / disconnect grace expiry, cleanup retries
|
reap DuplexSessionManager.reaper_loop: idle TTL / disconnect grace expiry, cleanup retries
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -604,9 +604,12 @@ class DuplexSessionManager:
|
|||||||
The session keeps its admission slot (``_closing``) until stage cleanup
|
The session keeps its admission slot (``_closing``) until stage cleanup
|
||||||
succeeded; a failed cleanup is retried by the reaper. For an explicit
|
succeeded; a failed cleanup is retried by the reaper. For an explicit
|
||||||
close the ``session.closed`` event is emitted only after the cleanup
|
close the ``session.closed`` event is emitted only after the cleanup
|
||||||
attempt, so a client that sees it can open a replacement session at
|
attempt, in a ``finally``, including when the cleanup failed (the
|
||||||
once (the runner used to emit it before the stage requests were
|
runner used to emit it before the stage requests were aborted). A
|
||||||
aborted, which let a prompt reopen hit ``resource_exhausted``).
|
client that sees the event can normally open a replacement session
|
||||||
|
right away, but after a failed cleanup the slot is still held until
|
||||||
|
the reaper succeeds, so a prompt reopen can be refused with
|
||||||
|
``resource_exhausted``.
|
||||||
"""
|
"""
|
||||||
session = runner.session
|
session = runner.session
|
||||||
submitted = tuple(session.resource_request_ids(submitted=True))
|
submitted = tuple(session.resource_request_ids(submitted=True))
|
||||||
|
|||||||
Reference in new issue
Block a user