hemantk-12 commented on code in PR #4909:
URL: https://github.com/apache/ozone/pull/4909#discussion_r1231480247
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SnapshotChainManager.java:
##########
@@ -48,6 +47,10 @@
public class SnapshotChainManager {
private static final Logger LOG =
LoggerFactory.getLogger(SnapshotChainManager.class);
+ // Dummy lock to synchronize addSnapshot and deleteSnapshot.
+ // This lock is also used by OMSnapshotCreateRequest to make sure that
+ // snapshot gets added to chain only if addition to cache is successfully.
+ public static final Object LOCK = new Object();
Review Comment:
Made the change and synchronized it on `SnapshotChainManager` object itself.
For making `SnapshotChainManager` singleton, I created jira:
https://issues.apache.org/jira/browse/HDDS-8862 because it may or may not cause
unit and integration tests failure. Similar to
https://issues.apache.org/jira/browse/HDDS-8557 when we made
`RocksDBCheckpointDiffer` singleton.
--
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]