heesung-sn commented on issue #23908:
URL: https://github.com/apache/pulsar/issues/23908#issuecomment-2672682617

   From this stats, 
https://github.com/apache/pulsar/issues/23908#issuecomment-2626817353
   
   I noticed that "unackedMessages" is non-zero. Seems like either the broker 
or consumer missed msg acks during the bk restarts.
   
   fyi, the ExtensibleLoadManager ignores message acks during 
topic.transferring state, by
   
https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L1974-L1984
   
   
   However, I think these unacked messages should be handled by Pulsar message 
re-delivery mechanism.
   
   You can confirm this behavior by the debug logs in the above code or 
`pulsar_lb_ignored_ack_total` metric.
   
   ```
   Partition-4 stats-internal:
   
   {
     "entriesAddedCounter" : 285,
     "numberOfEntries" : 409,
     "totalSize" : 4481595,
     "currentLedgerEntries" : 285,
     "currentLedgerSize" : 3521965,
     "lastLedgerCreatedTimestamp" : "2025-01-31T09:46:39.629Z",
     "waitingCursorsCount" : 1,
     "pendingAddEntriesCount" : 0,
     "lastConfirmedEntry" : "2044129:284",
     "state" : "LedgerOpened",
     "ledgers" : [ {
       "ledgerId" : 2043391,
       "entries" : 124,
       "size" : 959630,
       "offloaded" : false,
       "underReplicated" : false
     }, {
       "ledgerId" : 2044129,
       "entries" : 0,
       "size" : 0,
       "offloaded" : false,
       "underReplicated" : false
     } ],
     "cursors" : {
       "microbatcher" : {
         "markDeletePosition" : "2043391:112",
         "readPosition" : "2044129:285",
         "waitingReadOp" : true,
         "pendingReadOps" : 0,
         "messagesConsumedCounter" : 273,
         "cursorLedger" : 2044305,
         "cursorLedgerLastEntry" : 44,
         "individuallyDeletedMessages" : 
"[(2043391:122..2043391:123],(2044129:-1..2044129:282]]",
         "lastLedgerSwitchTimestamp" : "2025-01-31T09:46:39.675Z",
         "state" : "Open",
         "active" : true,
         "numberOfEntriesSinceFirstNotAckedMessage" : 297,
         "totalNonContiguousDeletedMessagesRange" : 2,
         "subscriptionHavePendingRead" : true,
         "subscriptionHavePendingReplayRead" : false,
         "properties" : { }
       }
     },
     "schemaLedgers" : [ ],
     "compactedLedger" : {
       "ledgerId" : -1,
       "entries" : -1,
       "size" : -1,
       "offloaded" : false,
       "underReplicated" : false
     }
   }
   ```
   


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