rdhabalia opened a new pull request #8928:
URL: https://github.com/apache/pulsar/pull/8928


   ### Motivation
   Pulsar stats reports an incorrect backlog for topic subscription and it also 
shows the discrepancy between topic stats and stats-internal. Below example 
shows that subs doesn't have any backlog but still stats shows backlog. So, 
topic-stats should capture precise backlog to avoid capturing invalidate data.
   
   ```
   stats:
   "sub-1" : {
         "msgRateOut" : 0.0,
         "msgThroughputOut" : 0.0,
         "msgRateRedeliver" : 0.0,
         "msgBacklog" : 1150,
         "blockedSubscriptionOnUnackedMsgs" : false,
         "msgDelayed" : 0,
   
   stats-internal:
   
   "sub-1" : {
         "markDeletePosition" : "546417:690",
         "readPosition" : "546417:691",
         "waitingReadOp" : true,
         "pendingReadOps" : 0,
         "messagesConsumedCounter" : 127360,
         "cursorLedger" : 546425025,
         "cursorLedgerLastEntry" : 18,
         "individuallyDeletedMessages" : "[]",
         "lastLedgerSwitchTimestamp" : "2020-08-19T21:48:06.307Z",
         "state" : "Open",
         "numberOfEntriesSinceFirstNotAckedMessage" : 1,
         "totalNonContiguousDeletedMessagesRange" : 0,
         "properties" : { }
   ```
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to