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 2021/12/02 10:21:12 UTC

[GitHub] [pulsar] liangyepianzhou opened a new pull request #13088: ### Motivation

liangyepianzhou opened a new pull request #13088:
URL: https://github.com/apache/pulsar/pull/13088


   ### Motivation 
   We should not generate the statistics of a uninitialized PendingAck,and we should check if it is initialized when we get it by `getStoreManageLedger()`.
   ### Modifications
    Do not generate the statistics of a uninitialized PendingAck.
    Add check if it is initialized when we get it by `getStoreManageLedger()`.
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [x] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] liangyepianzhou removed a comment on pull request #13088: [Transaction] Add a check for uninitialized PendingAck

Posted by GitBox <gi...@apache.org>.
liangyepianzhou removed a comment on pull request #13088:
URL: https://github.com/apache/pulsar/pull/13088#issuecomment-985103106


   /pulsar-bot run-failure-checks


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #13088: [Transaction] Add a check for uninitialized PendingAck

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #13088:
URL: https://github.com/apache/pulsar/pull/13088


   


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] liangyepianzhou commented on pull request #13088: [Transaction] Add a check for uninitialized PendingAck

Posted by GitBox <gi...@apache.org>.
liangyepianzhou commented on pull request #13088:
URL: https://github.com/apache/pulsar/pull/13088#issuecomment-985103106


   /pulsar-bot run-failure-checks


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] congbobo184 commented on a change in pull request #13088: [Transaction] Add a check for uninitialized PendingAck

Posted by GitBox <gi...@apache.org>.
congbobo184 commented on a change in pull request #13088:
URL: https://github.com/apache/pulsar/pull/13088#discussion_r761586600



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/PendingAckHandleImpl.java
##########
@@ -937,6 +937,10 @@ public TransactionInPendingAckStats getTransactionInPendingAckStats(TxnID txnID)
         }
     }
 
+    public boolean checkIfPendingAckStoreInit() {
+        return pendingAckStoreFuture != null;

Review comment:
       add check `this.pendingAckStoreFuture.isDone()`

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/TransactionAggregator.java
##########
@@ -64,7 +64,8 @@ public static void generate(PulsarService pulsar, SimpleTextOutputStream stream,
                             topic.getSubscriptions().values().forEach(subscription -> {
                                 try {
                                     localManageLedgerStats.get().reset();
-                                    if (!checkTopicIsEventsNames(TopicName.get(subscription.getTopic().getName()))) {
+                                    if (!checkTopicIsEventsNames(TopicName.get(subscription.getTopic().getName()))
+                                            && ((PersistentSubscription) subscription).checkIfPendingAckStoreInit()) {

Review comment:
       we should judge subscription class




-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] liangyepianzhou commented on pull request #13088: [Transaction] Add a check for uninitialized PendingAck

Posted by GitBox <gi...@apache.org>.
liangyepianzhou commented on pull request #13088:
URL: https://github.com/apache/pulsar/pull/13088#issuecomment-985103854


   /pulsarbot run-failure-checks


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] dave2wave commented on pull request #13088: ### Motivation

Posted by GitBox <gi...@apache.org>.
dave2wave commented on pull request #13088:
URL: https://github.com/apache/pulsar/pull/13088#issuecomment-984945749


   Please update the title to something meaningful


-- 
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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org