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 2020/01/02 17:46:21 UTC

[GitHub] [druid] swapneshgandhi commented on a change in pull request #8272: Support incremental load in Druid lookups

swapneshgandhi commented on a change in pull request #8272: Support incremental load in Druid lookups
URL: https://github.com/apache/druid/pull/8272#discussion_r362563795
 
 

 ##########
 File path: extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/cache/CacheScheduler.java
 ##########
 @@ -421,9 +443,16 @@ public String getVersion()
     @Override
     public void close()
     {
-      cacheHandler.close();
-      // Log statement after cacheHandler.close(), because logging may fail (e. g. in shutdown hooks)
-      log.debug("Closed version [%s] of %s", version, entryId);
+      // ideally, close shouldn't be called by users of VersionedCache in case of a incremental load,
+      // we do not close cacheHandler for such case.
+      if (this.incremental) {
+        log.debug("VersionedCache is of type incremental load, thus not closing cacheHandler " +
 
 Review comment:
   @leventov sorry for later reply I spent some time on it this week. If `VersionedCache` doesn't have `close()` method at all, are you saying `tryUpdateCache()` would stop closing VersionedCache a bunch of times like it does now?.
   Because in the first comment in this thread you said `VersionedCache.close()` should be a private method, in which case you would need a `if` condition to handle `doIncrementalLoad` differently in `tryUpdateCache()` or in that private `close()`. 

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