smengcl commented on code in PR #9140:
URL: https://github.com/apache/ozone/pull/9140#discussion_r2458755028
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/OmSnapshotLocalDataManager.java:
##########
@@ -62,6 +76,10 @@ public class OmSnapshotLocalDataManager implements
AutoCloseable {
private final MutableGraph<LocalDataVersionNode> localDataGraph;
private final Map<UUID, SnapshotVersionsMeta> versionNodeMap;
private final OMMetadataManager omMetadataManager;
+ // Used for acquiring locks on the entire data structure.
+ private final ReadWriteLock fullLock;
+ // Locks should be always acquired by iterating through the snapshot chain
to avoid deadlocks.
+ private HierarchicalResourceLockManager locks;
public OmSnapshotLocalDataManager(OMMetadataManager omMetadataManager)
throws IOException {
this.localDataGraph = GraphBuilder.directed().build();
Review Comment:
The same applies to `localDataGraph`
--
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]