Skip to content

Commit

Permalink
fix: Fix checkpointer race condition (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Oct 8, 2024
1 parent cc0eab2 commit b9f6fd0
Show file tree
Hide file tree
Showing 4 changed files with 6,756 additions and 6,636 deletions.
2 changes: 1 addition & 1 deletion libs/langgraph/src/pregel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ export class Pregel<
await loop.store?.stop();
}
await Promise.all([
loop?.checkpointerPromises ?? [],
...(loop?.checkpointerPromises ?? []),
...Array.from(managed.values()).map((mv) => mv.promises()),
]);
}
Expand Down
4 changes: 4 additions & 0 deletions libs/langgraph/src/tests/pregel.slow_checkpointer.int.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { runPregelTests } from "./pregel.test.js";
import { MemorySaverAssertImmutableSlow } from "./utils.js";

runPregelTests(() => new MemorySaverAssertImmutableSlow());
Loading

0 comments on commit b9f6fd0

Please sign in to comment.