You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "swamirishi (via GitHub)" <gi...@apache.org> on 2023/07/10 16:52:49 UTC

[GitHub] [ozone] swamirishi commented on a diff in pull request #5035: HDDS-8987. SST Filtering service should be stopped while before copying incremental snapshot

swamirishi commented on code in PR #5035:
URL: https://github.com/apache/ozone/pull/5035#discussion_r1258594365


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -3577,18 +3578,24 @@ public List<OzoneAcl> getAcl(OzoneObj obj) throws IOException {
    * @return If checkpoint is installed successfully, return the
    *         corresponding termIndex. Otherwise, return null.
    */
-  public TermIndex installSnapshotFromLeader(String leaderId) {
+  public synchronized TermIndex installSnapshotFromLeader(String leaderId) {
     if (omRatisSnapshotProvider == null) {
       LOG.error("OM Snapshot Provider is not configured as there are no peer " +
           "nodes.");
       return null;
     }
 
+    java.util.Optional<SstFilteringService> sstFilteringService =
+        java.util.Optional.ofNullable(
+            keyManager.getSnapshotSstFilteringService());
     DBCheckpoint omDBCheckpoint;
+    sstFilteringService.ifPresent(BackgroundService::shutdown);

Review Comment:
   We are shutting down the service anyway before installation. Locking doesn't make sense.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org