KAFKA-12541; Extend ListOffset to fetch offset with max timestamp (KIP-734)#10760
KAFKA-12541; Extend ListOffset to fetch offset with max timestamp (KIP-734)#10760dajac merged 17 commits intoapache:trunkfrom
Conversation
|
I will review it in the next few days. |
dajac
left a comment
There was a problem hiding this comment.
@thomaskwscott Thanks for the PR. I just made a first read over it and I left few high level questions and few nits.
I feel like we need to add more tests to cover the changes done in the PR. I can think of the following places where we might need to add and/or extend tests:
- RequestResponseTest
- ListOffsetsRequestTest
- KafkaAdminClientTest - Here we need to test all the edge cases.
- LogTest - We need to test the changes in Log.
- ListOffsetsRequestTest and/or LogOffsetTest
There might other places as well.
| Some(new TimestampAndOffset(latestTimestampSegment.maxTimestampSoFar, | ||
| latestTimestampSegment.offsetOfMaxTimestampSoFar, | ||
| epochOptional)) |
There was a problem hiding this comment.
Could we get a maxTimestampSoFar and offsetOfMaxTimestampSoFar which does not correspond to each others? It seems that we have no guarantee here. Is it an issue?
There was a problem hiding this comment.
In all cases I can find the 2 are updated together so I think we can assume consistency. For the topic liveness case in the KIP absolute consistency is not required but there will be other cases that will need this (e.g. topic inspection).
There was a problem hiding this comment.
I think that we should address this as well. I am fine with doing it in a follow-up PR though so we can keep this focused. Ok for you?
There was a problem hiding this comment.
Could we file a JIRA as a subtask in the Jira of the KIP to not forget about it?
There was a problem hiding this comment.
sure thing, raised: https://issues.apache.org/jira/browse/KAFKA-12981
|
@thomaskwscott Thanks for the update. I will review it next week. |
dajac
left a comment
There was a problem hiding this comment.
@thomaskwscott Thanks for the update. I left few more comments.
dajac
left a comment
There was a problem hiding this comment.
@thomaskwscott Thanks for the update. I left a few more comments/questions.
dajac
left a comment
There was a problem hiding this comment.
@thomaskwscott The PR looks pretty good. I left a few minor comments.
|
Failures are not related: |
|
@vvcephei filed https://issues.apache.org/jira/browse/KAFKA-13002, please take a look and see if it's related to this. |
|
Looking at it now. |
|
We have found the issue. @thomaskwscott is working on the fix. My bad, I missed one case. |
|
Thanks for the quick investigation! |
…P-734) (apache#10760) This patch implements KIP-734 as described in https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp. Reviewers: David Jacot <djacot@confluent.io>
…TAMP specs (apache#10936) This patch fixes a regression introduced apache#10760. The downgrade logic was not downgrading the version when only non MAX_TIMESTAMP specs were used. Reviewers: David Jacot <djacot@confluent.io>
|
good job |
See https://cwiki.apache.org/confluence/display/KAFKA/KIP-734%3A+Improve+AdminClient.listOffsets+to+return+timestamp+and+offset+for+the+record+with+the+largest+timestamp
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Tested with new Integration test
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)