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


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2151,7 +2151,13 @@ public void operationFailed(ManagedLedgerException 
exception) {
 
                 mdEntry.triggerFailed(exception);
             }
-        });
+        };
+
+        if (State.NoLedger.equals(STATE_UPDATER.get(this))) {
+            persistPositionMetaStore(mdEntry, cb);

Review Comment:
   > If the BookKeeper cluster runs into read-only mode and millions of 
consumers keep acknowledging the mark-delete position to brokers, we will 
persist the mark-delete position to the meta store without any throttle policy, 
will it bring high pressure or risk for the meta store? especially when we use 
Zookeeper as the Pulsar cluster's meta store service.
   
   Some users may want to set BK to read-only, and stop sending messages but 
consume messages.
   
   However, pulsar does not support this yet, because even if only the message 
is consumed, there is still some BK write operations, here are some examples:
   - If a transaction is used when consuming a message, a transaction log is 
also written
   - Compaction tasks are still written to BK
   - Topic policies depend on BK write
   - https://github.com/apache/pulsar/issues/16691
   - https://github.com/apache/pulsar/issues/16763
   - https://github.com/apache/pulsar/issues/16042
   - ... and so on 
   
   If we want to support the above scenario "Make BK read-only and only consume 
messages", we should need a large 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