sijie commented on a change in pull request #10098:
URL: https://github.com/apache/pulsar/pull/10098#discussion_r605872793



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java
##########
@@ -760,7 +760,7 @@ private void checkReplicatedSubscriptionMarker(Position 
position, MessageImpl<?>
 
         int markerType = msg.getMessageBuilder().getMarkerType();
 
-        if 
(!remoteCluster.equals(msg.getMessageBuilder().getReplicatedFrom())) {
+        if (!remoteCluster.equals(msg.getReplicatedFrom())) {

Review comment:
       I am not sure this is the right fix. 
   
   If you want to address the issue `java.lang.IllegalStateException: Field 
'replicated_from' is not set`, you should check 
`msg.getMessageBuilder().hasReplicatedFrom()`.
   
   Your change brings inconsistent usage across different places. Line 756 and 
761 are using `MessageBuilder` and Line 763 is using `Message`.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to