prashantpogde commented on code in PR #4909:
URL: https://github.com/apache/ozone/pull/4909#discussion_r1231387000
##########
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:
We don't need new object, we can synchronize on 'this'.
--
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]