swamirishi commented on code in PR #8555:
URL: https://github.com/apache/ozone/pull/8555#discussion_r2136391890
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java:
##########
@@ -86,8 +87,20 @@ public class SstFilteringService extends BackgroundService
private final BootstrapStateHandler.Lock lock = new
BootstrapStateHandler.Lock();
public static boolean isSstFiltered(OzoneConfiguration ozoneConfiguration,
SnapshotInfo snapshotInfo) {
- Path sstFilteredFile =
Paths.get(OmSnapshotManager.getSnapshotPath(ozoneConfiguration,
- snapshotInfo), SST_FILTERED_FILE);
+ // First try to read the flag from YAML file
+ String yamlPath =
OmSnapshotManager.getSnapshotLocalPropertyYamlPath(ozoneConfiguration,
snapshotInfo);
+
+ try (OmSnapshotLocalProperty localProperties = new
OmSnapshotLocalPropertyYamlImpl(yamlPath)) {
Review Comment:
There could be a potential race condition if multiple threads parallely try
to open. It would be better if this comes from the snapshotCache.
OmSnapshotLocalProperty could be a field inside OmSnapshot class.
--
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]