Client Resource Lifecycle

Client Resource Lifecycle A lifecycle diagram generated by Archify. 01 / Resource states 02 / Waves and rollback 03 / Outcomes CLOSED · no generation · Resource states · entry 01 CLOSED no generation entry OPENING · transactional wave · Resource states · epoch allocated 02 OPENING transactional wave epoch allocated OPEN · calls admitted · Resource states · bound loop 03 OPEN calls admitted bound loop CLOSING · phased teardown · Resource states · coalesced 04 CLOSING phased teardown coalesced CLOSED · generation retired · Resource states · reopenable 05 CLOSED generation retired reopenable Rollback · open failed · Waves and rollback · recoverable Rollback open failed recoverable Draining · in-flight calls · Waves and rollback · no retire Draining in-flight calls no retire retry open Legend start active state waiting terminal success failure / exit

Generations

  • • Each open wave allocates an epoch that fences the kernel and auth coordinator
  • • A stale epoch cannot write into a newer generation

Drain

  • • drain() waits for in-flight calls but leaves the generation open
  • • Close waves are coalesced and retained across caller cancellation

Rollback

  • • A failed open runs prepare_close then close_resources on every participant
  • • Rollback failures are logged, never allowed to mask the original open error