Renkai commented on a change in pull request #8717:
URL: https://github.com/apache/pulsar/pull/8717#discussion_r538172478



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -1536,7 +1537,18 @@ void asyncReadEntries(OpReadEntry opReadEntry) {
 
             LedgerInfo info = ledgers.get(ledgerId);
             CompletableFuture<ReadHandle> openFuture = new 
CompletableFuture<>();
-            if (info != null && info.hasOffloadContext() && 
info.getOffloadContext().getComplete()) {
+
+            if (config.getLedgerOffloader() != null
+                    && config.getLedgerOffloader().getOffloadPolicies() != null
+                    && config.getLedgerOffloader().getOffloadPolicies()

Review comment:
       @hangc0276 
   I think 
   `org.apache.pulsar.broker.admin.v2.PersistentTopics#setOffloadPolicies`
   
`org.apache.pulsar.broker.admin.impl.PersistentTopicsBase#internalSetOffloadPolicies`
   
`org.apache.pulsar.broker.admin.impl.PersistentTopicsBase#internalUpdateOffloadPolicies`
   `org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl#setConfig`
   
   and 
   
   
`org.apache.pulsar.zookeeper.ZooKeeperCache#process(org.apache.zookeeper.WatchedEvent,
 org.apache.pulsar.zookeeper.ZooKeeperCache.CacheUpdater<T>)`
   `org.apache.pulsar.zookeeper.ZooKeeperChildrenCache#reloadCache`
   `org.apache.pulsar.broker.service.BrokerService#onUpdate`
   
`org.apache.pulsar.broker.service.persistent.PersistentTopic#onPoliciesUpdate`
   
`org.apache.pulsar.broker.service.persistent.PersistentTopic#checkPersistencePolicies`
   `org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl#setConfig`
   
   are assurable chains to keep config up to date




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to