Skip to content
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

MINOR: Only send delete request if there are offsets in map #7256

Merged

Conversation

@bbejeck
Copy link
Contributor

commented Aug 27, 2019

Currently on commit streams will attempt to delete offsets from repartition topics. However, if a topology does not have any repartition topics, then the recordsToDelete map will be empty.

This PR adds a check that the recordsToDelete is not empty before executing the AdminClient#deleteRecords() method.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@bbejeck bbejeck added the streams label Aug 27, 2019

@bbejeck
Copy link
Contributor Author

left a comment

I should add a test for this.

@bbejeck

This comment has been minimized.

Copy link
Contributor Author

commented Aug 27, 2019

@ableegoldman
Copy link
Contributor

left a comment

Thanks Bill!

Just to clarify that, if the map is empty, then we would not send the delete-topics request but we would still send a metadata request with empty topics list.

@guozhangwang guozhangwang merged commit fcfee61 into apache:trunk Aug 28, 2019

3 checks passed

JDK 11 and Scala 2.12 SUCCESS 11843 tests run, 80 skipped, 0 failed.
Details
JDK 11 and Scala 2.13 SUCCESS 11843 tests run, 80 skipped, 0 failed.
Details
JDK 8 and Scala 2.11 SUCCESS 11843 tests run, 80 skipped, 0 failed.
Details
guozhangwang added a commit that referenced this pull request Aug 28, 2019
MINOR: Only send delete request if there are offsets in map (#7256)
Currently on commit streams will attempt to delete offsets from repartition topics. However, if a topology does not have any repartition topics, then the recordsToDelete map will be empty.

This PR adds a check that the recordsToDelete is not empty before executing the AdminClient#deleteRecords() method.

Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
@guozhangwang

This comment has been minimized.

Copy link
Contributor

commented Aug 28, 2019

Cherry-picked to 2.3 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.