This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new ac9742ad53e [improve][client] Change the get lastMessageId to debug 
level (#18421)
ac9742ad53e is described below

commit ac9742ad53e19e62363580cfa5096121f70ee8d8
Author: Yong Zhang <[email protected]>
AuthorDate: Mon Nov 14 08:48:21 2022 +0800

    [improve][client] Change the get lastMessageId to debug level (#18421)
---
 .../main/java/org/apache/pulsar/client/impl/ConsumerImpl.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java 
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
index 1ca6fabe1b4..99441631bb9 100644
--- 
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
+++ 
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
@@ -2375,7 +2375,9 @@ public class ConsumerImpl<T> extends ConsumerBase<T> 
implements ConnectionHandle
 
             long requestId = client.newRequestId();
             ByteBuf getLastIdCmd = Commands.newGetLastMessageId(consumerId, 
requestId);
-            log.info("[{}][{}] Get topic last message Id", topic, 
subscription);
+            if (log.isDebugEnabled()) {
+                log.debug("[{}][{}] Get topic last message Id", topic, 
subscription);
+            }
 
             cnx.sendGetLastMessageId(getLastIdCmd, requestId).thenAccept(cmd 
-> {
                 MessageIdData lastMessageId = cmd.getLastMessageId();
@@ -2384,8 +2386,10 @@ public class ConsumerImpl<T> extends ConsumerBase<T> 
implements ConnectionHandle
                     markDeletePosition = new 
MessageIdImpl(cmd.getConsumerMarkDeletePosition().getLedgerId(),
                             cmd.getConsumerMarkDeletePosition().getEntryId(), 
-1);
                 }
-                log.info("[{}][{}] Successfully getLastMessageId {}:{}",
-                    topic, subscription, lastMessageId.getLedgerId(), 
lastMessageId.getEntryId());
+                if (log.isDebugEnabled()) {
+                    log.debug("[{}][{}] Successfully getLastMessageId {}:{}",
+                        topic, subscription, lastMessageId.getLedgerId(), 
lastMessageId.getEntryId());
+                }
 
                 MessageId lastMsgId = lastMessageId.getBatchIndex() <= 0
                         ? new MessageIdImpl(lastMessageId.getLedgerId(),

Reply via email to