-
Notifications
You must be signed in to change notification settings - Fork 5
Fix wrong topics in metadata requests #73
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
base: main
Are you sure you want to change the base?
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.
Good spot! Some changes
// For some unknown reason this is necessary, otherwise the test hangs | ||
// I guess the previous test had the same issue | ||
// TODO: Investigate why this is necessary | ||
await new Promise(resolve => setTimeout(resolve, 1000)) |
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.
Can you investigate this?
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.
I already had a short look at it, but it does not seem easy to find out. I can investigate, but for now, I would keep the investigation independent of this PR if possible.
There is one more fix for metadata requests. More on that in the description. |
consume
is failing in the following workflow:The issue is that the consumer still holds a reference to the deleted topic, and metadata requests in the
#fetch
method fail as metadata for this topic is not available.This PR solves this issue by untracking all topics before retracking the target topics inside the function
#performConsume
in theConsumer
class.Edit: This change also disentangles metadata requests with different topics. Previously, metadata requests were deduplicated independently on the topics that were requested, potentially leading to wrong results for subsequent metadata requests. Deduplication is now done based on requested topics.