lhotari commented on code in PR #25795:
URL: https://github.com/apache/pulsar/pull/25795#discussion_r3362449120


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1749,8 +1767,11 @@ public void operationComplete(Void v, Stat stat) {
                     synchronized (ManagedLedgerImpl.this) {
                         try {
                             State state = 
STATE_UPDATER.get(ManagedLedgerImpl.this);
-                            if (state == State.Closed || state.isFenced()) {
-                                log.debug().log("skip ledger update after 
create complete ledger is closed or fenced");
+                            if (state == State.Closed || state == 
State.Terminated || state.isFenced()) {

Review Comment:
   > For this PR, I would like to keep the scope focused on the immediate 
terminated-state and pending-add behavior: once termination has taken effect, 
late callbacks should not move the managed ledger back to a writable state, and 
pending add callbacks should complete consistently.
   
   It just feels that this approach isn't correct. The problem itself is real. 
   
   > I think this is worth doing as a follow-up design/change.
   
   Yes, it most likely makes sense to start with the analysis and design. In 
Pulsar, it's most natural to document the problem, analysis and design into a 
PIP before implementation (prototypes and experimentation are obviously 
recommended and necessary when coming up with the design).



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