-
-
Notifications
You must be signed in to change notification settings - Fork 409
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 for seekTo feature #630
Conversation
@authorjapps There was a bug in the seekTo feature . In situations where there are multiple partitions on the topic and some of the partitions do not have a valid offset corresponding the timestamp to seek to, the seek operation will give an NPE. Can you review the fix? |
Got you @a1shadows . That scenario causing NPE. e.g. Then with the fix, it should pass as expected(without NPE) |
@authorjapps I'll look into this |
…rtition topics, changed test to have sorted messages so that assertion does not fail
@authorjapps I've added a multi partition topic test to the CI. For this, I added an init container to the docker compose file, since by default the cp-kafka docker image does not accept num.partitions as an env variable for auto created topics. I ran it locally and it ran fine. However, for the CI the docker compose files are picked from the master branch so can't get a proper test on here Do you have anything in mind for this? Can we run the CI using the docker compose files on the branch we are trying to merge? |
Fixes #631
PR Branch
#ADD LINK TO THE PR BRANCH
Motivation and Context
If there are partitions for which there is no valid offset corresponding to the timestamp to seek to, the offsetForTimestamp method still includes it in the Map returned, but with a NULL value. We need to skip all partitions that have offset as NULL when subscribing to avoid an error when we try to seek to the offset at a later step.
Checklist:
Unit tests added
Integration tests added
Test names are meaningful
Feature manually tested
Branch build passed
No 'package.*' in the imports
Relevant Wiki page updated with clear instruction for the end user
Http test added to
http-testing
module(if applicable) ?Kafka test added to
kafka-testing
module(if applicable) ?