chia7712 commented on code in PR #20175:
URL: https://github.com/apache/kafka/pull/20175#discussion_r2572693459
##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -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;
Review Comment:
What do you think of the cost of creating a logger per handler? This is a
concern, especially, considering the efforts in KAFKA-18046 and PR #19138 to
reduce LOG4j CPU usage.
My testing shows the log4j2 issue is most evident in `WriteStateHandler`.
The quick fix is to make `DefaultStatePersister` pre-create the logger just for
`WriteStateHandler`, or we could extend this solution to all related handlers
--
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]