hachikuji commented on code in PR #14774:
URL: https://github.com/apache/kafka/pull/14774#discussion_r1423341054


##########
core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala:
##########
@@ -283,36 +284,7 @@ class GroupMetadataManager(brokerId: Int,
           } else {
             debug(s"Metadata from group ${group.groupId} with generation 
$generationId failed when appending to log " +
               s"due to ${status.error.exceptionName}")
-
-            // transform the log append error code to the corresponding the 
commit status error code
-            status.error match {
-              case Errors.UNKNOWN_TOPIC_OR_PARTITION
-                   | Errors.NOT_ENOUGH_REPLICAS
-                   | Errors.NOT_ENOUGH_REPLICAS_AFTER_APPEND =>
-                Errors.COORDINATOR_NOT_AVAILABLE
-
-              case Errors.NOT_LEADER_OR_FOLLOWER
-                   | Errors.KAFKA_STORAGE_ERROR =>
-                Errors.NOT_COORDINATOR
-
-              case Errors.REQUEST_TIMED_OUT =>
-                Errors.REBALANCE_IN_PROGRESS
-
-              case Errors.MESSAGE_TOO_LARGE
-                   | Errors.RECORD_LIST_TOO_LARGE
-                   | Errors.INVALID_FETCH_SIZE =>
-
-                error(s"Appending metadata message for group ${group.groupId} 
generation $generationId failed due to " +

Review Comment:
   We lost the error messages. We could probably keep them in the new utility 
and just pass through the groupId (i.e. leave out the generation). Probably 
overkill to do some kind of custom callback. 



##########
core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala:
##########
@@ -283,36 +284,7 @@ class GroupMetadataManager(brokerId: Int,
           } else {
             debug(s"Metadata from group ${group.groupId} with generation 
$generationId failed when appending to log " +
               s"due to ${status.error.exceptionName}")
-
-            // transform the log append error code to the corresponding the 
commit status error code
-            status.error match {
-              case Errors.UNKNOWN_TOPIC_OR_PARTITION
-                   | Errors.NOT_ENOUGH_REPLICAS
-                   | Errors.NOT_ENOUGH_REPLICAS_AFTER_APPEND =>
-                Errors.COORDINATOR_NOT_AVAILABLE
-
-              case Errors.NOT_LEADER_OR_FOLLOWER
-                   | Errors.KAFKA_STORAGE_ERROR =>
-                Errors.NOT_COORDINATOR
-
-              case Errors.REQUEST_TIMED_OUT =>
-                Errors.REBALANCE_IN_PROGRESS
-
-              case Errors.MESSAGE_TOO_LARGE
-                   | Errors.RECORD_LIST_TOO_LARGE
-                   | Errors.INVALID_FETCH_SIZE =>
-
-                error(s"Appending metadata message for group ${group.groupId} 
generation $generationId failed due to " +

Review Comment:
   We lost the error messages. We could probably keep them in the new utility 
and pass through the groupId (i.e. leave out the generation). Probably overkill 
to do some kind of custom callback. 



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to