You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xi...@apache.org on 2023/02/06 06:48:05 UTC
[pulsar] branch branch-2.10 updated: [improve][client] Change the get lastMessageId to debug level (#18421)
This is an automated email from the ASF dual-hosted git repository.
xiangying pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new fde620e614e [improve][client] Change the get lastMessageId to debug level (#18421)
fde620e614e is described below
commit fde620e614e7f7071c0f4826ee7fe231e701af72
Author: Yong Zhang <zh...@gmail.com>
AuthorDate: Mon Nov 14 08:48:21 2022 +0800
[improve][client] Change the get lastMessageId to debug level (#18421)
(cherry picked from commit ac9742ad53e19e62363580cfa5096121f70ee8d8)
---
.../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 190ddd8b435..36a59ff14a0 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
@@ -2353,7 +2353,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();
@@ -2362,8 +2364,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(),