KAFKA-8982: Add retry of fetching metadata to Admin.deleteRecords#13760
KAFKA-8982: Add retry of fetching metadata to Admin.deleteRecords#13760showuon merged 6 commits intoapache:trunkfrom
Conversation
divijvaidya
left a comment
There was a problem hiding this comment.
Nice change! Added some comments on error handling. Otherwise looks good.
showuon
left a comment
There was a problem hiding this comment.
@tinaselenge , left a meta-comment. Thanks.
mimaison
left a comment
There was a problem hiding this comment.
Thanks for the PR. I made a first quick pass and left a few comments
The test was expecting LeaderNotAvailableException when deleting records on non existant partition. This test case will no longer fail with this exception because now the metadata request will be retried and the delete records request will timeout instead. Therefore removed this particular test case so that the test does not wait until timeout.
|
@divijvaidya @showuon @mimaison Thank you very much for reviewing the PR! I believe I have addressed the comments now. Please let me know if I have missed anything. Thanks. |
showuon
left a comment
There was a problem hiding this comment.
Thanks for the update. Left some comments.
|
@tinaselenge , it looks like some tests are failed: https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13760/6/ |
|
Thank you @showuon for the feedback. I think I have addressed the comments. Please let me know there is anything I missed or doesn't look right. |
|
Re-running CI build: https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13760/9/ |
|
Failed tests are unrelated. |
…mnative#942) Main changes: - Adapt to the new `AddPartitionsToTxnRequest` from apache/kafka#13231 (KIP-890) - Support the new `DescribeTopicPartitions` request from apache/kafka#14612 (KIP-966), which is required by some admin APIs Other changes: - apache/kafka#13760 will retry when `deleteRecords` returns a retriable error, change the error code to `INVALID_REQUEST`
Use AdminApiDriver class to refresh the metadata and retry the request that failed with retriable errors.
Modified the unit and integration test cases for LEADER_NOT_AVAILABLE or NOT_LEADER_OR_FOLLOWER as they are now retried using the driver.
Committer Checklist (excluded from commit message)