You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/07/26 05:55:27 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #4557: [transaction][acknowledge] Persist pending ack messages to cursor meta store.

sijie commented on a change in pull request #4557: [transaction][acknowledge] Persist pending ack messages to cursor meta store.
URL: https://github.com/apache/pulsar/pull/4557#discussion_r307596587
 
 

 ##########
 File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
 ##########
 @@ -2015,6 +2020,59 @@ public void operationFailed(MetaStoreException e) {
                 });
     }
 
+    public void persistPendingAckPositionMetaInfo(PositionInfo.Builder pendingCumulativeAckMessagePositionBuilder,
+                                                  List<PendingAckMessageEntry> pendingAckMessageEntryBuilderList,
+                                                  String subName, MetaStoreCallback<Void> callback) {
+        if (isClosed()) {
+            callback.operationFailed(new MetaStoreException(
+                    new ManagedLedgerException.CursorAlreadyClosedException(name + " cursor already closed")));
+            return;
+        }
+
+        SubscriptionPendingAckMessages.Builder subscriptionPendingAckMessageBuilder = SubscriptionPendingAckMessages.newBuilder()
+                    .setPendingCumulativeAckMessagePosition(pendingCumulativeAckMessagePositionBuilder)
+                    .addAllPendingAckMessages(pendingAckMessageEntryBuilderList);
+
+        log.debug("[{}] [{}] [{}] Persisting subscription's pending ack messages to meta-data store",
 
 Review comment:
   wrap this into `log.isDebugEnabled()`.
   
   ```
   if (log.isDebugEnabled()) {
       ...
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services