You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/19 13:54:02 UTC

[GitHub] [incubator-druid] drcrallen commented on a change in pull request #7509: Fix too many dentry cache slab objs#7508.

drcrallen commented on a change in pull request #7509: Fix too many dentry cache slab objs#7508.
URL: https://github.com/apache/incubator-druid/pull/7509#discussion_r276992199
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/LimitedTemporaryStorage.java
 ##########
 @@ -125,10 +125,10 @@ public void close()
       for (File file : ImmutableSet.copyOf(files)) {
         delete(file);
       }
-      files.clear();
-      if (storageDirectory.exists() && !storageDirectory.delete()) {
+      if (files.size() > 0 && storageDirectory.exists() && !storageDirectory.delete()) {
 
 Review comment:
   `size` must actually check the object, and depending on the collection, may have to traverse or do other special record keeping operations. Some collections can optimize this and others cannot. `isEmpty()` should be used when simply checking for emptyness.

----------------------------------------------------------------
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: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org