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: http-kafka will fetch messages that have been deleted by a reten… #1033

Merged
merged 4 commits into from
May 24, 2024

Conversation

aDaemonThread
Copy link
Contributor

…tion policy

Fixes #897

@aDaemonThread aDaemonThread marked this pull request as ready for review May 18, 2024 00:45
@@ -126,23 +126,26 @@ public void init(
this.latestOffset = latestOffset;

assert !segmentNode.sentinel();
KafkaCacheSegment newSegment = null;
while (newSegment == null)
if (segmentNode.segment() != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

if the assert above is true, such that segmentNode is not the sentinel, then is it still possible for segmentNode.segment() != null to be false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a possible case, as before we call cursor.init() method, mentioned check is done. Thus making segmentNode.segment() == null possible even after asserting !segmentNode.sentinel()

if (segmentNode.sentinel())
{
    segmentNode = segmentNode.next();
}

@jfallows jfallows merged commit 761dcfa into aklivity:develop May 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http-kafka will fetch messages that have been deleted by a retention policy
2 participants