dragosvictor commented on code in PR #22048:
URL: https://github.com/apache/pulsar/pull/22048#discussion_r1486997019


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelTest.java:
##########
@@ -984,6 +984,9 @@ public void conflictAndCompactionTest() throws 
ExecutionException, InterruptedEx
         channel3.close();
         FieldUtils.writeDeclaredField(channel2,
                 "inFlightStateWaitingTimeInMillis", 30 * 1000, true);
+        admin.topicPolicies()
+                .setCompactionThreshold(ServiceUnitStateChannelImpl.TOPIC, 
threshold);

Review Comment:
   I'm sorry for the confusion. It's not that `setCompactionThreshold` might 
fail, but anything in between the previous call to this "reset" call might 
(i.e., lines 
https://github.com/apache/pulsar/pull/22048/files#diff-0bb4e0f521ef681668abbb30387c7de6ebf6cfce7dcbdd3d2f318ac50f6cc8abR967-R986).
 So put the entire respective block in a `try` and this in a `finally`.



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