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



##########
File path: 
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java
##########
@@ -1336,11 +1335,35 @@ void run() throws PulsarAdminException {
                 , description = "ManagedLedger offload deletion lag in bytes")
         private Long offloadDeletionLagInMillis;
 
+        @Parameter(
+                names = {"--offloadedReadPriority", "-orp"},
+                description = "read priority for offloaded messages",
+                required = false
+        )
+        private String offloadReadPriorityStr;
+
         @Override
         void run() throws PulsarAdminException {
             String persistentTopic = validatePersistentTopic(params);
+
+            var offloadedReadPriority = 
OffloadPolicies.DEFAULT_OFFLOADED_READ_PRIORITY;

Review comment:
       not suggest to use `var`

##########
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:
       The `OffloadPolicies` you get from `config` may not be updated as 
namespace or topic policy update.




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