ethqunzhong opened a new pull request, #20366: URL: https://github.com/apache/pulsar/pull/20366
Related issue #20355 ### Motivation The current implementation has the following issues: 1. When constructing offload metrics, using the managedLeger name as topicName results in an incorrect format, causing abnormal display of metrics on Grafana. 2. When calculating offload bytes for Filesystem offload, it incorrectly calculates the actual write value, resulting in much larger metrics than the actual value. ### Modifications 1. Add the `fromPersistenceNamingEncoding` method to `TopicName` and use mlname to obtain the topic name. 2. Replace the part of using mlname in the logic of topic label before offload metrics with using topicname. 3. Modify the logic of `recordOffloadBytes` in filesystem offloader, change `entry.getLength()` to `entry.getEntryBytes().length`. ### Verifying this change - [x] Make sure that the change passes the CI checks. This change is already covered by existing tests. ### Does this pull request potentially affect one of the following parts: *If the box was checked, please highlight the changes* - [x] Dependencies (add or upgrade a dependency) - [ ] The public API - [ ] The schema - [ ] The default values of configurations - [ ] The threading model - [ ] The binary protocol - [ ] The REST endpoints - [ ] The admin CLI options - [ ] The metrics - [ ] Anything that affects deployment ### Documentation - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> ### Matching PR in forked repository PR in forked repository: https://github.com/ethqunzhong/pulsar/pull/6 -- 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]
