BewareMyPower commented on code in PR #24522:
URL: https://github.com/apache/pulsar/pull/24522#discussion_r2213259684


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java:
##########
@@ -420,6 +420,23 @@ void asyncOpenCursor(String name, InitialPosition 
initialPosition, Map<String, L
      */
     long getOffloadedSize();
 
+    /**
+     * Resets the exception thrown by the PayloadProcessor during an add entry 
operation to null.
+     * <p>
+     * **Context:** When an add entry operation fails due to an interceptor, 
all subsequent incoming add entry
+     * operations will also fail. This behavior ensures message ordering and 
consistency.
+     * <p>
+     * **Important:** This method MUST only be called after all pending add 
operations are fully completed
+     * (e.g., after a Topic is unfenced). Calling it prematurely will prevent 
the Managed Ledger (ML)
+     * from being able to write indefinitely.
+     * <p>
+     * **Implementation Note:** Downstream projects that support the ML 
PayloadProcessor should implement

Review Comment:
   > why should the ML PayloadProcessor implement this method?
   
   Its the **Downstream projects** that support the ML PayloadProcessor should 
implement this method, not the **ML PayloadProcessor**. Because if there is no 
ML PayloadProcessor, no exception will be set for failure.



##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java:
##########
@@ -420,6 +420,23 @@ void asyncOpenCursor(String name, InitialPosition 
initialPosition, Map<String, L
      */
     long getOffloadedSize();
 
+    /**
+     * Resets the exception thrown by the PayloadProcessor during an add entry 
operation to null.
+     * <p>
+     * **Context:** When an add entry operation fails due to an interceptor, 
all subsequent incoming add entry
+     * operations will also fail. This behavior ensures message ordering and 
consistency.
+     * <p>
+     * **Important:** This method MUST only be called after all pending add 
operations are fully completed
+     * (e.g., after a Topic is unfenced). Calling it prematurely will prevent 
the Managed Ledger (ML)
+     * from being able to write indefinitely.
+     * <p>
+     * **Implementation Note:** Downstream projects that support the ML 
PayloadProcessor should implement

Review Comment:
   > why should the ML PayloadProcessor implement this method?
   
   It's the **Downstream projects** that support the ML PayloadProcessor should 
implement this method, not the **ML PayloadProcessor**. Because if there is no 
ML PayloadProcessor, no exception will be set for failure.



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to