He-Pin commented on PR #3030: URL: https://github.com/apache/pekko/pull/3030#issuecomment-4902791155
Rebased onto origin/main and addressed all Copilot review feedback: **Review comment 1** (test identity stage instances): Already fixed — same `identityStage` instance is reused for builder and both connections. **Review comment 2** (nulling only in `finish()`): Fixed — `afterStageHasRun()` now scans ALL logics for completed stages (not just the active stage parameter) and nulls `logics(i)` + connection handlers for finalized stages. This ensures completed stage logics are released during normal stream execution, not just at interpreter shutdown. **Review comment 3** (Connection strong references): Fixed — `finish()` now nulls all four Connection fields: `inHandler`, `outHandler`, `inOwner`, `outOwner`. `afterStageHasRun()` nulls `inHandler`/`outHandler` for finalized stages (but preserves `inOwner`/`outOwner` since they may be needed by subsequent event processing on the same connection). Debug name methods (`inOwnerName`, `outOwnerName`, `inLogicName`, `outLogicName`) have null guards. `toSnapshot` filters connections with null owners. **Additional improvements:** - `toSnapshot` uses `connection.inOwner.stageId` for positional indexing instead of identity-based map lookups - Added null guard for `logic` in `finish()` to handle idempotent calls - `GraphStageLogicSpec` "not double-terminate" test saves logic references before `execute()` **Test results:** GraphInterpreterSpec 13/13, GraphStageLogicSpec 17/17, InterpreterSpec+Lifecycle+Supervision+FailureModes+ActorGraphInterpreter 65/65 — all passed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
