lianetm commented on code in PR #16031:
URL: https://github.com/apache/kafka/pull/16031#discussion_r1626569362
##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/CommitRequestManagerTest.java:
##########
@@ -1097,19 +1132,18 @@ private void testNonRetriable(final
List<CompletableFuture<Map<TopicPartition, O
*/
private static Stream<Arguments> offsetCommitExceptionSupplier() {
return Stream.of(
- Arguments.of(Errors.NOT_COORDINATOR),
- Arguments.of(Errors.COORDINATOR_LOAD_IN_PROGRESS),
- Arguments.of(Errors.UNKNOWN_SERVER_ERROR),
- Arguments.of(Errors.GROUP_AUTHORIZATION_FAILED),
- Arguments.of(Errors.OFFSET_METADATA_TOO_LARGE),
- Arguments.of(Errors.INVALID_COMMIT_OFFSET_SIZE),
- Arguments.of(Errors.UNKNOWN_TOPIC_OR_PARTITION),
- Arguments.of(Errors.COORDINATOR_NOT_AVAILABLE),
- Arguments.of(Errors.REQUEST_TIMED_OUT),
- Arguments.of(Errors.FENCED_INSTANCE_ID),
- Arguments.of(Errors.TOPIC_AUTHORIZATION_FAILED),
- Arguments.of(Errors.STALE_MEMBER_EPOCH),
- Arguments.of(Errors.UNKNOWN_MEMBER_ID));
+ Arguments.of(Errors.NOT_COORDINATOR, true),
+ Arguments.of(Errors.COORDINATOR_LOAD_IN_PROGRESS, true),
+ Arguments.of(Errors.UNKNOWN_SERVER_ERROR, false),
+ Arguments.of(Errors.GROUP_AUTHORIZATION_FAILED, false),
+ Arguments.of(Errors.OFFSET_METADATA_TOO_LARGE, false),
+ Arguments.of(Errors.INVALID_COMMIT_OFFSET_SIZE, false),
+ Arguments.of(Errors.UNKNOWN_TOPIC_OR_PARTITION, false),
+ Arguments.of(Errors.COORDINATOR_NOT_AVAILABLE, true),
+ Arguments.of(Errors.REQUEST_TIMED_OUT, false),
+ Arguments.of(Errors.FENCED_INSTANCE_ID, false),
+ Arguments.of(Errors.TOPIC_AUTHORIZATION_FAILED, false),
+ Arguments.of(Errors.UNKNOWN_MEMBER_ID, false));
Review Comment:
I would say we don't need to keep/maintain this new argument here to know if
the exception is retriable. We can simply check `error.exception() instanceof
RetriableException` when needed??
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]