nodece commented on code in PR #24498:
URL: https://github.com/apache/pulsar/pull/24498#discussion_r2238581633


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java:
##########
@@ -172,11 +172,19 @@ public void initiate() {
             ledger.asyncAddEntry(duplicateBuffer, this, addOpCount);
         } else {
             State state = STATE_UPDATER.get(OpAddEntry.this);
+            if (state == State.INITIATED || state == State.COMPLETED || state 
== State.CLOSED) {
+                log.warn("[{}] OpAddEntry is already initiated or completed or 
closed, state={}", ml.getName(), state);
+                return;
+            }
+

Review Comment:
   It looks unnecessary.



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