smengcl commented on code in PR #11849:
URL: https://github.com/apache/ozone/pull/11849#discussion_r4543289048


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -421,6 +421,14 @@ public void stopSnapshotSstFilteringService() {
     }
   }
 
+  @Override
+  public void restartSnapshotSstFilteringService(OzoneConfiguration conf) {
+    if (snapshotSstFilteringService != null) {

Review Comment:
   nit: this matches the old flow in the default setup, thanks for re-adding 
the guard. Just one small difference worth noting in the description:
   
   the old code decided based on the old interval 
(`isSstFilteringSvcEnabled()`), not on whether the service was running. With 
`ozone.snapshot.defrag.service.interval` > 0 and the SST filtering interval > 
0, the service is never started, so the old `Objects.requireNonNull` threw an 
NPE on reconfiguration. Checking `snapshotSstFilteringService != null` avoids 
that, which looks like an improvement to me. Maybe just mention it, since the 
description says there is no functional change.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to