Avoid caching sync error and interrupt writes#7114
Open
Alexxigang wants to merge 2 commits intolangchain-ai:mainfrom
Open
Avoid caching sync error and interrupt writes#7114Alexxigang wants to merge 2 commits intolangchain-ai:mainfrom
Alexxigang wants to merge 2 commits intolangchain-ai:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a sync-only cache inconsistency where
SyncPregelLoop.put_writes()cachedERRORandINTERRUPTtask writes even though the async path already skips them.That could poison the sync cache with failed/interrupted task results. In practice, repeated invocations could replay cached failures instead of re-running the task, and cached
interrupt()writes could be replayed into the sync scheduler and crash withIndexError: deque index out of range.Changes
ERROR/INTERRUPTcache guard toSyncPregelLoop.put_writes()that already exists inAsyncPregelLoop.put_writes()Testing
Passed locally:
8 passed in 0.23sIssue
Closes #7015