smengcl commented on code in PR #4419:
URL: https://github.com/apache/ozone/pull/4419#discussion_r1151030600
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -180,6 +182,28 @@ public OmSnapshot load(@Nonnull String snapshotTableKey)
// see if the snapshot exists
snapshotInfo = getSnapshotInfo(snapshotTableKey);
+ // Block snapshot from loading when it is no longer active e.g.
DELETED,
+ // unless this is called from SnapshotDeletingService.
+ // TODO: [SNAPSHOT] However, snapshotCache.get() from other requests
Review Comment:
> One idea is to introduce a flag in OmSnapshot like isAccessedBySDS and set
it to true while SDS tries to load it , if other readers try to access, we can
quickly check this flag and restrict access.
@sadanand48 Actually this roughly becomes the same idea as the first
revision of the patch, where I check snapshot status right before every single
(read) operation. While here is just checking this new flag.
--
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]