You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/06/04 05:17:11 UTC

[GitHub] [hadoop] avijayanhwx commented on a change in pull request #882: HDDS-1624 : Refactor operations inside the bucket lock in OM key write.

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org