-
Notifications
You must be signed in to change notification settings - Fork 1.1k
.NET: fix: FileSystemJsonCheckpointStore does not flush to disk on Checkpoint creation #3439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET: fix: FileSystemJsonCheckpointStore does not flush to disk on Checkpoint creation #3439
Conversation
de443d8 to
4bd50f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Fixes FileSystemJsonCheckpointStore so the index (index.jsonl) is flushed during checkpoint creation, ensuring the on-disk index is up to date when CreateCheckpointAsync returns (addresses #3169).
Changes:
- Flush
index.jsonlafter appending a checkpoint entry inCreateCheckpointAsync. - Add a unit test verifying the index file has non-zero length before the store is disposed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/FileSystemJsonCheckpointStore.cs | Flushes the index stream after writing a new checkpoint entry. |
| dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/FileSystemJsonCheckpointStoreTests.cs | Adds coverage to ensure index data is persisted prior to store disposal. |
dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/FileSystemJsonCheckpointStoreTests.cs
Show resolved
Hide resolved
4bd50f3 to
86e7226
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
86e7226 to
95cb660
Compare
Description
Flushes the index file on checkpoint creation to ensure we get disk status current when control returns to user code after the checkpoint.
Fixes #3169
Contribution Checklist
Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.