Skip to content

Commit d08f787

Browse files
authored
[ISSUE #9807] Optimize log.warn Time Consumption in the send Method (#9808)
1 parent d750461 commit d08f787

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,9 @@ private SendResult sendDefaultImpl(
809809
endTimestamp = System.currentTimeMillis();
810810
this.updateFaultItem(mq.getBrokerName(), endTimestamp - beginTimestampPrev, false, true);
811811
log.warn("sendKernelImpl exception, resend at once, InvokeID: {}, RT: {}ms, Broker: {}", invokeID, endTimestamp - beginTimestampPrev, mq, e);
812-
log.warn(msg.toString());
812+
if (log.isDebugEnabled()) {
813+
log.debug(msg.toString());
814+
}
813815
exception = e;
814816
continue;
815817
} catch (RemotingException e) {

0 commit comments

Comments
 (0)