You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "prashantpogde (via GitHub)" <gi...@apache.org> on 2023/08/08 00:59:35 UTC

[GitHub] [ozone] prashantpogde commented on a diff in pull request #5158: HDDS-9129. Add SSTFiltered flag in SnapshotInfo table.

prashantpogde commented on code in PR #5158:
URL: https://github.com/apache/ozone/pull/5158#discussion_r1286497986


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java:
##########
@@ -187,9 +174,8 @@ public BackgroundTaskResult call() throws Exception {
           }
 
           // mark the snapshot as filtered by writing to the file
-          String content = snapshotInfo.getSnapshotId() + "\n";
-          Files.write(filePath, content.getBytes(StandardCharsets.UTF_8),
-              StandardOpenOption.CREATE, StandardOpenOption.APPEND);
+          snapshotInfo.setSstFiltered(true);
+          snapshotInfoTable.put(snapShotTableKey, snapshotInfo);

Review Comment:
   Lock/Serializsation needed ? Other services could be changing the snapshot Info fields.



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