bharatviswa504 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_r290069647
 
 

 ##########
 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:
   Here, we need to check value also along with key.
   
   A case like createBucket, DeleteBucket, we will have the key in the cache 
for that bucket, but with the value null. And also is this isExist will be 
called with the lock? As someone can modify the key while checks are happening.

----------------------------------------------------------------
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]

Reply via email to