lhotari commented on a change in pull request #14556:
URL: https://github.com/apache/pulsar/pull/14556#discussion_r819347641
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java
##########
@@ -145,9 +145,10 @@ public int
filterEntriesForConsumer(Optional<EntryWrapper[]> entryWrapper, int e
MessageMetadata msgMetadata = entryWrapper.isPresent() &&
entryWrapper.get()[entryWrapperIndex] != null
? entryWrapper.get()[entryWrapperIndex].getMetadata()
: null;
- msgMetadata = msgMetadata == null
- ? Commands.peekMessageMetadata(metadataAndPayload,
subscription.toString(), -1)
- : msgMetadata;
+ if (msgMetadata == null) {
Review comment:
> It's a good motivation, is it better to avoid passing the msgMetadata?
Instead, we can create local variable, looks like
yes, avoiding the instance is a better choice. I'll take a look in the
refactoring.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]