Skip to content
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

Fix missing messages in streaming on CacheMissException #9309

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benjaminpetit
Copy link
Member

@benjaminpetit benjaminpetit commented Jan 30, 2025

Fix #9299 and #9023

When recovering from a CacheMissException, subscriber could miss messages if it happened during processing a handshake with the pulling agent.

Microsoft Reviewers: Open in CodeFlow

@benjaminpetit benjaminpetit added the area-streaming Category for Orleans streaming issues label Jan 30, 2025
// If the token is more recent than the last purged token, then we didn't lose anything. Start from the oldest message in cache
cursor.State = CursorStates.Set;
// If the token is more recent than the last purged token, then we didn't lose anything. Start from the oldest message in cache.
// We use the state "Recovering" instead of "Set" to avoid to skip a message, since we are not pointing to the latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// We use the state "Recovering" instead of "Set" to avoid to skip a message, since we are not pointing to the latest
// We use the state "Recovering" instead of "Set" to avoid skipping a message, since we are not pointing to the latest

@@ -265,7 +267,7 @@ private void SetCursor(Cursor cursor, StreamSequenceToken sequenceToken)
/// <returns></returns>
public bool TryGetNextMessage(object cursorObj, out IBatchContainer message)
{
message = null;
message = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message = null;
message = null;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like an errant space, or my eyes are errant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-streaming Category for Orleans streaming issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Orleans streaming with Event Hubs skips over messages when stream is inactive
2 participants