- Notifications
You must be signed in to change notification settings - Fork2.1k
Make it so when there is a cache miss exception the pulling agent can…#9714
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Make it so when there is a cache miss exception the pulling agent can…#9714
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
This PR introduces a newOldestInStreamToken to handle cache miss scenarios by allowing the pulling agent to restart from the oldest available message in the cache, rather than passingnull or attempting to extract a token from the exception.
Key Changes:
- Introduced
OldestInStreamTokenclass that represents the oldest position in a stream - Updated cache miss handling to use
OldestInStreamToken.Instanceinstead ofnull - Added cache logic to handle
OldestInStreamTokenby positioning cursors at the oldest message
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Orleans.Streaming/Core/OldestInStreamToken.cs | New token class representing the oldest position in a stream |
| src/Orleans.Streaming/PersistentStreams/PersistentStreamPullingAgent.cs | Updated cache miss exception handling to useOldestInStreamToken.Instance |
| src/Orleans.Streaming/Common/PooledCache/PooledQueueCache.cs | Added logic to position cursor at oldest message whenOldestInStreamToken is provided |
| test/TesterInternal/OrleansRuntime/Streams/PooledQueueCacheTests.cs | Added test coverage for getting cursor at oldest entry |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
test/TesterInternal/OrleansRuntime/Streams/PooledQueueCacheTests.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ReubenBond commentedOct 22, 2025
@benjaminpetit PTAL |
Fix typo in test comment.
…n-at-oldest-message
Uh oh!
There was an error while loading.Please reload this page.
Make it so when there is a cache miss exception the pulling agent can start with the oldest message. This is an alternate approach to getting the latest token from the exception as is done in#9711.
This also solves the issue demonstrated inhttps://github.com/BMagerMT/OrleansStreamingIssue
Microsoft Reviewers:Open in CodeFlow