apache / apache/pulsar

pulsar_storage_size used backlogsize?

Open
#15,492 2 comments 0 reactions 0 assignees View on GitHub
Stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

**Describe the bug**
A clear and concise description of what the bug is.

pulsar_storage_size means

```
The total storage size of the topics in this topic owned by this broker (bytes).
```

but in PersistentTopic

```
nsStats.storageSize += ledger.getEstimatedBacklogSize();

```

maybe it should be

```
nsStats.storageSize += ledger.getTotalSize();

```
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by locating PersistentTopic and the code that updates nsStats.storageSize. Compare the documented meaning of pulsar_storage_size with getEstimatedBacklogSize() and getTotalSize(), then trace existing storage-stat tests or metric consumers. Done means the metric reports the documented total topic storage size and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.