NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
coordinator.h File Reference

CheckpointCoordinator — owns the super-step checkpoint lifecycle. More...

#include <neograph/api.h>
#include <neograph/graph/types.h>
#include <neograph/graph/checkpoint.h>
#include <neograph/graph/scheduler.h>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for coordinator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  neograph::graph::CheckpointCoordinator
 Per-run coordinator for checkpoint lifecycle operations. More...
 
struct  neograph::graph::ResumeContext
 Context needed to resume execution from the last saved snapshot. More...
 

Detailed Description

CheckpointCoordinator — owns the super-step checkpoint lifecycle.

Pulled out of GraphEngine::execute_graph so the three intertwined concerns that used to live there — snapshot write, resume-context load, and pending-writes log — each sit behind named methods with their own invariants. The coordinator is a thin, per-run wrapper over a CheckpointStore + thread_id pair:

  • save_super_step: build a Checkpoint, write it, return its id.
  • load_for_resume: pull the latest cp plus every pending write, and return a ResumeContext the engine can apply wholesale.
  • record_pending_write / clear_pending_writes: fine-grained progress log for partial-failure recovery.

When the backing store is nullptr or the thread_id is empty, every method is a safe no-op (save returns "", load returns an empty ResumeContext). Callers no longer need to guard on both conditions at every call site.

The coordinator does NOT touch admin APIs (get_state, update_state, fork) — those don't have a super-step boundary and continue to use CheckpointStore directly on GraphEngine.

Definition in file coordinator.h.