hemantk-12 commented on code in PR #5070:
URL: https://github.com/apache/ozone/pull/5070#discussion_r1264234029
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java:
##########
@@ -172,7 +172,12 @@ private void generateSnapshotCheckpoint(HttpServletRequest
request,
}
try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) {
+ if (dbStore.getRocksDBCheckpointDiffer() != null) {
Review Comment:
It is not needed because counted is atomic.
The reason I used `synchronized` [here line
224](https://github.com/apache/ozone/pull/5070/files#diff-8f8a9ef7fcf15970b94259f3d8dbe5a3d553dc8d10f0bce7cddebf28ada08b4cR224)
because `notifyAll()` has to be called from `synchronized` block.
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java:
##########
@@ -172,7 +172,12 @@ private void generateSnapshotCheckpoint(HttpServletRequest
request,
}
try (BootstrapStateHandler.Lock lock = getBootstrapStateLock().lock()) {
+ if (dbStore.getRocksDBCheckpointDiffer() != null) {
Review Comment:
It is not needed because counter is atomic.
The reason I used `synchronized` [here line
224](https://github.com/apache/ozone/pull/5070/files#diff-8f8a9ef7fcf15970b94259f3d8dbe5a3d553dc8d10f0bce7cddebf28ada08b4cR224)
because `notifyAll()` has to be called from `synchronized` block.
--
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]