Skip to content

Remove CompletedFetch type from Fetcher#7228

Merged
hachikuji merged 3 commits into
apache:trunkfrom
seglo:seglo/KAFKA-8822
Sep 6, 2019
Merged

Remove CompletedFetch type from Fetcher#7228
hachikuji merged 3 commits into
apache:trunkfrom
seglo:seglo/KAFKA-8822

Conversation

@seglo

@seglo seglo commented Aug 21, 2019

Copy link
Copy Markdown
Member

Jira issue KAFKA-8822.

The CompletedFetch type is no longer required due to the work merged in PR #6988 (KAFKA-7548). This PR consolidates CompletedFetch into PartitionRecords as discussed in #6988 (comment) with @hachikuji.

@seglo

seglo commented Aug 24, 2019

Copy link
Copy Markdown
Member Author

Retest this please.

@seglo
seglo force-pushed the seglo/KAFKA-8822 branch 2 times, most recently from d33d30f to afd1f4c Compare August 26, 2019 18:09
@hachikuji hachikuji self-assigned this Aug 27, 2019

@hachikuji hachikuji left a comment

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

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 == true when the records are drained which normally happens after it's been fully consumed. We could rename it to isDrained or isConsumed.
  • Fetcher.nextInLineRecords - I assume this was derived from the PartitionRecords type as well, but I'm not sure. It could be renamed to nextInLineCompletedFetch or nextInLineFetch.

@hachikuji hachikuji Sep 4, 2019

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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.

@seglo
seglo force-pushed the seglo/KAFKA-8822 branch 2 times, most recently from 8cc2e67 to 097d0dc Compare September 2, 2019 20:47

@hachikuji hachikuji left a comment

Copy link
Copy Markdown
Contributor

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.

@hachikuji

Copy link
Copy Markdown
Contributor

retest this please

@seglo

seglo commented Sep 4, 2019

Copy link
Copy Markdown
Member Author

@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

@hachikuji

Copy link
Copy Markdown
Contributor

@seglo Sorry, missed your comment. Your suggestions sound good to me.

@seglo

seglo commented Sep 5, 2019

Copy link
Copy Markdown
Member Author

Ok, I think it's ready to go. I'll watch to get a clean test run.

@seglo

seglo commented Sep 5, 2019

Copy link
Copy Markdown
Member Author

Retest this please.

@hachikuji
hachikuji merged commit ad3ccf8 into apache:trunk Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants