-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kgo: track topic IDs in the fetch session
When using a fetch session, if we stop fetching a topic or partition, we send that information in the fetch request. If we forget an entire topic, that means we do not add any cursor for the topic internally -- we just outright are no longer fetching the topic -- we previously had no topic ID in the fetch request for the forgotten topic. When sending this forgotten topic in the fetch request, we would not have the ID for it, and this would cause a NPE in Kafka. Now, when we add a topic to the session, we also save the topic ID. We use this for two purposes: * Now we correctly send the forgotten topic ID * We also can pin fetch requests to non-topic-ID versions if any topic is missing an ID at any point in the session (i.e. if a forgotten topic has no ID) Lastly we add a guard in metadata updating to ignore updates that miss topic IDs if we previously had a topic ID. Closes #535.
- Loading branch information
Showing
2 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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