This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 9cf1cc9b5bf [fix][broker] pulsar admin stats internal with metadata
command (#25557)
9cf1cc9b5bf is described below
commit 9cf1cc9b5bf5d5581fe4e40318b85dfdd2ec77f7
Author: Rahul <[email protected]>
AuthorDate: Wed Apr 22 16:43:50 2026 +0530
[fix][broker] pulsar admin stats internal with metadata command (#25557)
Co-authored-by: Rahul Prasad <[email protected]>
---
.../org/apache/pulsar/broker/service/persistent/PersistentTopic.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
index 4d57da30cb2..db5ab64ad11 100644
---
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
+++
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
@@ -3162,6 +3162,9 @@ public class PersistentTopic extends AbstractTopic
implements Topic, AddEntryCal
info.ledgerId = compactedTopicContext.getLedger().getId();
info.entries =
compactedTopicContext.getLedger().getLastAddConfirmed() + 1;
info.size = compactedTopicContext.getLedger().getLength();
+ if (includeLedgerMetadata) {
+ info.metadata =
compactedTopicContext.getLedger().getLedgerMetadata().toSafeString();
+ }
}
stats.compactedLedger = info;
@@ -3243,7 +3246,7 @@ public class PersistentTopic extends AbstractTopic
implements Topic, AddEntryCal
schemaLedgerInfo.entries =
metadata.getLastEntryId() + 1;
schemaLedgerInfo.size =
metadata.getLength();
if (includeLedgerMetadata) {
- info.metadata =
metadata.toSafeString();
+ schemaLedgerInfo.metadata =
metadata.toSafeString();
}
stats.schemaLedgers.add(schemaLedgerInfo);
completableFuture.complete(null);