codelipenghui commented on a change in pull request #6758:
URL: https://github.com/apache/pulsar/pull/6758#discussion_r411454097



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
##########
@@ -2552,9 +2552,10 @@ protected void internalSetOffloadPolicies(AsyncResponse 
asyncResponse, OffloadPo
             final String path = path(POLICIES, namespaceName.toString());
             byte[] content = globalZk().getData(path, null, nodeStat);
             Policies policies = jsonMapper().readValue(content, 
Policies.class);
-
-            if (offloadPolicies.getManagedLedgerOffloadDeletionLagInMillis()
-                    
.equals(OffloadPolicies.DEFAULT_OFFLOAD_DELETION_LAG_IN_MILLIS)) {
+            // there is possibility that 
`offloadPolicies.getManagedLedgerOffloadDeletionLagInMillis()` is null.
+            if (offloadPolicies.getManagedLedgerOffloadDeletionLagInMillis() 
== null && OffloadPolicies.DEFAULT_OFFLOAD_DELETION_LAG_IN_MILLIS == null
+                    || 
offloadPolicies.getManagedLedgerOffloadDeletionLagInMillis() != null
+                    && 
offloadPolicies.getManagedLedgerOffloadDeletionLagInMillis().equals(OffloadPolicies.DEFAULT_OFFLOAD_DELETION_LAG_IN_MILLIS))
 {

Review comment:
       Looks not related to this PR right?




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