You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/01/28 14:18:04 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #10478: [Broker] PIP:84 Redeliver command add epoch.

eolivelli commented on a change in pull request #10478:
URL: https://github.com/apache/pulsar/pull/10478#discussion_r794541931



##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java
##########
@@ -545,15 +546,15 @@ public static ByteBuf newSubscribe(String topic, String subscription, long consu
         return newSubscribe(topic, subscription, consumerId, requestId, subType, priorityLevel, consumerName,
                 isDurable, startMessageId, metadata, readCompacted, isReplicated, subscriptionInitialPosition,
                 startMessageRollbackDurationInSec, schemaInfo, createTopicIfDoesNotExist, null,
-                Collections.emptyMap());
+                Collections.emptyMap(), -1L);

Review comment:
       can we use a constant for this "magic number" -1 ?

##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
##########
@@ -352,11 +364,22 @@ private void resumeReceivingFromPausedConsumersIfNeeded() {
     @Override
     protected Message<T> internalReceive(int timeout, TimeUnit unit) throws PulsarClientException {
         Message<T> message;
+
+        long callTime = System.currentTimeMillis();

Review comment:
       what about using nanoTime ?

##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java
##########
@@ -479,7 +480,7 @@ public static BaseCommand newMessageCommand(long consumerId, long ledgerId, long
     public static ByteBufPair newMessage(long consumerId, long ledgerId, long entryId, int partition,
             int redeliveryCount, ByteBuf metadataAndPayload, long[] ackSet) {
         return serializeCommandMessageWithSize(
-                newMessageCommand(consumerId, ledgerId, entryId, partition, redeliveryCount, ackSet),
+                newMessageCommand(consumerId, ledgerId, entryId, partition, redeliveryCount, ackSet, 0L),

Review comment:
       can we use a constant for this "magic number" 0 ?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org