BewareMyPower commented on code in PR #24522:
URL: https://github.com/apache/pulsar/pull/24522#discussion_r2213033536
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java:
##########
@@ -420,6 +420,20 @@ void asyncOpenCursor(String name, InitialPosition
initialPosition, Map<String, L
*/
long getOffloadedSize();
+ /**
+ * Reset the exception that was thrown by the PayloadProcessor during the
add entry operation to null.
+ * If one add entry operation failed due to the interceptor, it will fail
all the incoming add entry operations,
+ * it's for keep the message ordering and consistency.
+ * <p>
+ * The method MUST be called after all the pendingAddOperations are
completed (such as Topic un-fenced),
+ * otherwise it will cause the ML unable to write forever.
+ * <p>
+ * For downstream projects, if supports ML PayloadProcessor, it should
impl the method. Otherwise, don't.
+ */
Review Comment:
```suggestion
/**
* 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
* this method. Otherwise, do not implement it.
*/
```
--
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]