Skip to content

Conversation

@Technoboy-
Copy link
Contributor

@Technoboy- Technoboy- commented Oct 14, 2025

Motivation

When we call getNumOfEntries, it count the number of entries without checking whether the ledger has been deleted, so numberOfEntriesSinceFirstNotAckedMessage may show there is 1 entry, but all the message has been acked. See the below stats.

{
  "waitingCursorsCount": 1,
  "pendingAddEntriesCount": 0,
  "entriesAddedCounter": 5820,
  "numberOfEntries": 0,
  "totalSize": 0,
  "currentLedgerEntries": 0,
  "currentLedgerSize": 0,
  "lastLedgerCreatedTimestamp": "2025-10-09T06:00:25.57Z",
  "lastLedgerCreationFailureTimestamp": "",
  "lastConfirmedEntry": "10461995:143",
  "state": "LedgerOpened",
  "ledgers": [
    {
      "ledgerId": 10469839,
      "entries": 0,
      "size": 0,
      "timestamp": 0,
      "offloaded": false,
      "metadata": "",
      "underReplicated": false
    }
  ],
  "cursors": {
    "test-service": {
      "markDeletePosition": "10461995:143",
      "readPosition": "10461995:144",
      "waitingReadOp": true,
      "pendingReadOps": 0,
      "messagesConsumedCounter": 5820,
      "cursorLedger": 10462118,
      "cursorLedgerLastEntry": 200,
      "individuallyDeletedMessages": "[]",
      "lastLedgerWitchTimestamp": "",
      "state": "Open",
      "numberOfEntriesSinceFirstNotAckedMessage": 1,
    }
  },
}

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions
Copy link

@Technoboy- Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Oct 14, 2025
@Technoboy- Technoboy- requested a review from coderzc October 14, 2025 12:26
ganesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 23, 2025
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 28, 2025
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 30, 2025
nodece pushed a commit to ascentstream/pulsar that referenced this pull request Oct 30, 2025
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 6, 2025
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants