poorbarcode commented on code in PR #24178:
URL: https://github.com/apache/pulsar/pull/24178#discussion_r2043744691


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/GeoReplicationProducerImpl.java:
##########
@@ -108,6 +108,15 @@ private void ackReceivedReplicatedMsg(ClientCnx cnx, 
OpSendMsg op, long sourceLI
         if (pendingLId != null && pendingEId != null
                 && (pendingLId < lastPersistedSourceLedgerId || 
(pendingLId.longValue() == lastPersistedSourceLedgerId
                   && pendingEId.longValue() <= lastPersistedSourceEntryId))) {
+            if 
(MessageImpl.SchemaState.Broken.equals(op.msg.getSchemaState())) {
+                log.error("[{}] [{}] Replication due to incompatible schem and 
the replicator will be stuck by producer"

Review Comment:
   Improved the log
   
   - Pulsar client will discard messages which has a broken schema, but it 
never releases the message when discarding the message.
   - Replication need be stuck when a message can not be replicated due to 
failed schema registration. Otherwise, it may cause an out-of-order issue, and 
it may lead to a messages lost issue if users enabled deduplication on the 
remote side.



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

Reply via email to