avijayanhwx commented on a change in pull request #882: HDDS-1624 : Refactor
operations inside the bucket lock in OM key write.
URL: https://github.com/apache/hadoop/pull/882#discussion_r290128256
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/utils/db/TypedTable.java
##########
@@ -79,6 +79,12 @@ public boolean isEmpty() throws IOException {
return rawTable.isEmpty();
}
+ @Override
+ public boolean isExist(KEY key) throws IOException {
+ return cache.get(new CacheKey<>(key)) != null ||
Review comment:
@bharatviswa504 Yes, the isExist method will be called with the lock.
I am not sure I understand the createBucket, Delete Bucket scenario you have
mentioned. In the case of create bucket, if the cache is used why would the
value be null? And even if the value is null, we fall back to actual DB. In
the case of Delete bucket, shouldn't the value of get(key) be null? And it wont
exist in the DB also?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]