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

is it a bug with DeleteRecords #1377

Closed
evazca opened this issue May 22, 2019 · 1 comment
Closed

is it a bug with DeleteRecords #1377

evazca opened this issue May 22, 2019 · 1 comment

Comments

@evazca
Copy link
Contributor

evazca commented May 22, 2019

Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama Version: a4a1b88
Kafka Version: 2.1.1
Go Version: 1.12.1

Configuration
Not relevant

Logs
Not relevant

Problem Description
The method DeleteRecords in admin.go seems to have a bug. The DeleteRecordsRequest should be sent to Leader according to KafkaAdminClient rather than the controller(https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java). Also the controller will respond with an error code 6 but the return error of the method is nil.

I'm going to fix it as below

  1. call client.Leader to get leader info
  2. send the request to the leaders.
  3. an error will be returned if a topic partition failed. (or return slice of errors)
@d1egoaz
Copy link
Contributor

d1egoaz commented Aug 22, 2019

fixed by #1425

@d1egoaz d1egoaz closed this as completed Aug 22, 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

No branches or pull requests

2 participants