Skip to content

KAFKA-19499: Corrected the logger name in PersisterStateManagerHandler #20175

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

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ private CompletableFuture<ShareGroupHeartbeatResponseData> handlePersisterInitia
}
return performShareGroupStateMetadataInitialize(groupId, topicPartitionMap, defaultResponse);
}
log.error("Received error while calling initialize state for {} on persister {}.", groupId, persisterError.code());
log.error("Received error while calling initialize state for {} on persister, errorCode: {}.", groupId, persisterError.code());
return uninitializeShareGroupState(persisterError, groupId, topicPartitionMap);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public void setGenerateCallback(Runnable generateCallback) {
public abstract class PersisterStateManagerHandler implements RequestCompletionHandler {
protected Node coordinatorNode;
private final BackoffManager findCoordBackoff;
protected final Logger log = LoggerFactory.getLogger(getClass());
protected final Logger log;
private Consumer<ClientResponse> onCompleteCallback;
protected final SharePartitionKey partitionKey;

Expand All @@ -237,6 +237,11 @@ public PersisterStateManagerHandler(
this.onCompleteCallback = response -> {
}; // noop
partitionKey = SharePartitionKey.getInstance(groupId, topicId, partition);
String canonicalName = getClass().getCanonicalName();
if (canonicalName == null) {
canonicalName = getClass().getName();
}
log = LoggerFactory.getLogger(canonicalName);
}

/**
Expand Down
Loading