hemantk-12 commented on code in PR #4249:
URL: https://github.com/apache/ozone/pull/4249#discussion_r1097841708
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -911,6 +918,22 @@ private boolean isKeyPresentInTableCache(String keyPrefix,
return false;
}
+
+ static boolean isSnapshotPresentInTableCache(String keyPrefix, Table table) {
Review Comment:
1. The function name is wrong because `isSnapshotPresentInTableCache` seems
specific to snapshot but we are passing table to make it generic. Either change
the function to something generic or move it to `OmSnapshotManager` .
1. Why do we need to iterator over the table instead of just using
[`get`](https://github.com/apache/ozone/blob/074d225f2ab0c9658ffa35f021c6cba2116f40cc/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/Table.java#L85)
or
[getSkipCache](https://github.com/apache/ozone/blob/074d225f2ab0c9658ffa35f021c6cba2116f40cc/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/Table.java#L96)?
1. Wouldn't it always return `true` because [entry is in
cache](https://github.com/hemantk-12/ozone/blob/ccc814ee7f8a7cac70b6d64dcae12056e375199d/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java#L149)?
Please correct me if I'm wrong.
1. One more doubt if flushing the RocksDB operations queue actually creates
checkpointing dir because it could be another async operation. Please double
check that.
--
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]