horizonzy commented on code in PR #16405:
URL: https://github.com/apache/pulsar/pull/16405#discussion_r918651003


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java:
##########
@@ -734,8 +734,17 @@ public void start() throws PulsarServerException {
             schemaRegistryService = SchemaRegistryService.create(
                     schemaStorage, 
config.getSchemaRegistryCompatibilityCheckers(), this.executor);
 
-            this.defaultOffloader = createManagedLedgerOffloader(
-                    
OffloadPoliciesImpl.create(this.getConfiguration().getProperties()));
+            OffloadPoliciesImpl defaultOffloadPolicies =
+                    
OffloadPoliciesImpl.create(this.getConfiguration().getProperties());
+            this.defaultOffloader = 
createManagedLedgerOffloader(defaultOffloadPolicies);

Review Comment:
   We should make 
   ```
    this.defaultOffloader = 
createManagedLedgerOffloader(defaultOffloadPolicies);
   ```
   after 
   ```
   offloaderStats = 
LedgerOffloaderStats.create(config.isExposeManagedLedgerMetricsInPrometheus(),
         exposeTopicMetrics, offloaderScheduler, interval);
   ```
   
   In `createManagedLedgerOffloader`, it will use `offloaderStats`. We shuold 
make this method after `offloaderStats` override.



-- 
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]

Reply via email to