He-Pin opened a new pull request, #3030: URL: https://github.com/apache/pekko/pull/3030
### Motivation When multiple stages are fused, a single alive stage keeps the GraphInterpreter alive and with it references to all already completed GraphStage logics, which may keep a significant amount of memory. This issue was originally reported in akka/akka-core#23439. ### Modification - Modified GraphInterpreter.finish() to release references to all stage logics after finalization - Modified GraphInterpreter.toSnapshot() to handle null logics gracefully - Added null checks in finish() to avoid NPE when logic is already null ### Result GraphInterpreter no longer keeps references to completed stage logics, allowing them to be garbage collected even if the interpreter is still alive due to other fused stages. ### Tests - Added directional test to verify logics are released after finish() - Added test to verify logics are released when stages complete early ### References - Fixes #1234 (GraphInterpreter should not keep references to shut-down logics) - Related to akka/akka-core#23439 -- 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]
