smjn commented on code in PR #19998:
URL: https://github.com/apache/kafka/pull/19998#discussion_r2158120067
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -2324,8 +2328,12 @@ CompletableFuture<Void>
writeShareGroupState(List<PersisterStateBatch> stateBatc
PartitionErrorData partitionData = state.partitions().get(0);
if (partitionData.errorCode() != Errors.NONE.code()) {
KafkaException ex =
fetchPersisterError(partitionData.errorCode(), partitionData.errorMessage());
- log.error("Failed to write the share group state for share
partition: {}-{} due to exception",
+ log.debug("Failed to write the share group state for share
partition: {}-{} due to exception",
groupId, topicIdPartition, ex);
+ if (!(ex instanceof UnknownServerException)) {
Review Comment:
That is because the `SharePartition.fetchPersisterError` is wrapping the
error codes to UnknownServerException
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -501,8 +501,12 @@ public CompletableFuture<Void> maybeInitialize() {
if (partitionData.errorCode() != Errors.NONE.code()) {
KafkaException ex =
fetchPersisterError(partitionData.errorCode(), partitionData.errorMessage());
- log.error("Failed to initialize the share partition:
{}-{}. Exception occurred: {}.",
+ log.debug("Failed to initialize the share partition:
{}-{}. Exception occurred: {}.",
groupId, topicIdPartition, partitionData);
+ if (!(ex instanceof UnknownServerException)) {
Review Comment:
That is because the `SharePartition.fetchPersisterError` is wrapping the
error codes to UnknownServerException
--
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]