feat: support flame recovery#386
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the system's resilience by introducing a robust recovery framework. It establishes a sophisticated state machine for managing node connections, enabling the system to gracefully handle disconnections and restarts of both the Session and Executor Managers. The changes ensure that in-progress tasks are retried and system state is consistently reconciled, leading to a more stable and self-healing distributed environment. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive recovery mechanism for the Flame system, primarily by implementing new state machines for node connections and node states. Key changes include refactoring session_manager/src/controller/mod.rs to replace the WatchRegistry with a new ConnectionManager that utilizes ConnectionStates (Connected, Draining, Closed) and NodeStates (Unknown, Ready, NotReady) to manage node lifecycle and stream connections. The executor_manager is updated to report its active executors during registration and to handle ExecutorList messages for reconciliation, allowing it to release local executors if the session manager has cleaned them up. New design documents (CONNECTION_STATE_MACHINE.md, RFE384-flame-recovery/FS.md) detail these recovery strategies, including scenarios for network glitches and manager restarts, and outline algorithms for executor cleanup and task retries. Minor changes include adding comments to the NodeState enum, updating Cargo.lock with new dependencies, and refining filter structs in session_manager/src/model/mod.rs. A critical issue was identified where controller/mod.rs incorrectly references a non-existent ConnectionState::Shutdown variant instead of ConnectionState::Closed, which could break the node recovery path. Additionally, a documentation inconsistency was noted in docs/designs/RFE384-flame-recovery/FS.md where the Offline state is used instead of the NotReady enum variant defined in the code.
Signed-off-by: Klaus Ma <klausm@nvidia.com>
Signed-off-by: Klaus Ma <klausm@nvidia.com>
Signed-off-by: Klaus Ma <klausm@nvidia.com>
No description provided.