You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "poorbarcode (via GitHub)" <gi...@apache.org> on 2023/02/21 02:18:30 UTC
[GitHub] [pulsar] poorbarcode commented on a diff in pull request #19571: [improve][broker] Reduce object creation of EntryBatchIndexesAcks
poorbarcode commented on code in PR #19571:
URL: https://github.com/apache/pulsar/pull/19571#discussion_r1112468300
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java:
##########
@@ -392,6 +392,10 @@ public static void checkAndApplyReachedEndOfTopicOrTopicMigration(PersistentTopi
}
}
+ protected EntryBatchIndexesAcks getEntryBatchIndexesAcks(int entries) {
Review Comment:
+1
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java:
##########
@@ -781,7 +782,7 @@ private boolean sendChunkedMessagesToConsumers(ReadType readType,
}
final SendMessageInfo sendMessageInfo = SendMessageInfo.getThreadLocal();
final EntryBatchSizes batchSizes = EntryBatchSizes.get(messagesForC);
- final EntryBatchIndexesAcks batchIndexesAcks = EntryBatchIndexesAcks.get(messagesForC);
+ final EntryBatchIndexesAcks batchIndexesAcks = getEntryBatchIndexesAcks(messagesForC);
Review Comment:
+1
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java:
##########
@@ -275,7 +275,7 @@ protected synchronized boolean trySendMessagesToConsumers(ReadType readType, Lis
SendMessageInfo sendMessageInfo = SendMessageInfo.getThreadLocal();
EntryBatchSizes batchSizes = EntryBatchSizes.get(messagesForC);
- EntryBatchIndexesAcks batchIndexesAcks = EntryBatchIndexesAcks.get(messagesForC);
+ EntryBatchIndexesAcks batchIndexesAcks = getEntryBatchIndexesAcks(messagesForC);
Review Comment:
+1
--
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