-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Remove CompletedFetch type from Fetcher #7228
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
Conversation
|
Retest this please. |
d33d30f to
afd1f4c
Compare
hachikuji
left a comment
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.
Thanks, nice cleanup! Left a few small comments.
| @@ -1422,8 +1418,9 @@ private void drain() { | |||
| } | |||
| } | |||
|
|
|||
| // TODO: this has no usages. remove? | |||
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.
Yeah, let's remove if it's unused. We can add back if we need it.
| @@ -1379,10 +1368,12 @@ public static Sensor throttleTimeSensor(Metrics metrics, FetcherMetricsRegistry | |||
|
|
|||
| private class PartitionRecords { | |||
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.
What do you think about taking the name CompletedFetch here. It seemed a little more descriptive.
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 agree, since it's private to the Fetcher anyway. I've renamed it and a few obvious related variables and javadocs. There are some other things that could be renamed too, but I wanted to see what you thought first.
CompletedFetch.isFetched- This sounds a little strange now.isFetched == truewhen the records are drained which normally happens after it's been fully consumed. We could rename it toisDrainedorisConsumed.Fetcher.nextInLineRecords- I assume this was derived from thePartitionRecordstype as well, but I'm not sure. It could be renamed tonextInLineCompletedFetchornextInLineFetch.
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.
Sorry, missed this comment. Both of your suggestions sound good to me. I like isConsumed and nextInLineFetch.
| FetchResponse.PartitionData<Records> partitionData, | ||
| FetchResponseMetricAggregator metricAggregator, | ||
| Iterator<? extends RecordBatch> batches, | ||
| Long fetchedOffset, |
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.
nit: fetchOffset instead of fetchedOffset? I think this is meant to describe the offset from the fetch request.
8cc2e67 to
097d0dc
Compare
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.
LGTM. Thanks for the patch! I'll rerun tests one more time before merging since it's been a couple weeks.
|
retest this please |
|
@hachikuji Thanks. There were a couple more things that could be renamed if you want. See this comment I made earlier in the PR: #7228 (comment) If you have a moment could you take a quick look at my comments in the benchmark PR? #7221 |
|
@seglo Sorry, missed your comment. Your suggestions sound good to me. |
097d0dc to
b28cc84
Compare
|
Ok, I think it's ready to go. I'll watch to get a clean test run. |
|
Retest this please. |
Jira issue KAFKA-8822.
The
CompletedFetchtype is no longer required due to the work merged in PR #6988 (KAFKA-7548). This PR consolidatesCompletedFetchintoPartitionRecordsas discussed in #6988 (comment) with @hachikuji.