mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-10-14 20:25:23 +02:00
keep_latest now deletes a subgraph call's namespace together with the root checkpoint the call started from. A checkpointer=True subgraph keeps its latest checkpoint, since its one namespace holds state across calls, and a call whose root checkpoint isn't saved yet is left alone. Each thread is pruned in one REPEATABLE READ transaction that deletes everything its snapshot sees except the kept checkpoints, so what a run commits meanwhile survives whatever its ID. Writes go by the checkpoints deleted, since a run can commit a superstep's writes before its checkpoint. The per-thread statements live in one generator shared by the sync and async savers, run unprepared: a cached generic plan checks an = ANY array one element per row.