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

 ##########
 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:
   Not stop closing. The idea of this thread is to change visibility of close() 
outside `CacheScheduler`, but internal logic is essentially unchanged.
   
   An `if` would not be needed in new `VersionedCacheBuilder`, but may still be 
needed in `VersionedCache`. I don't see now why I wrote that "VersionedCache 
doesn't have close() method at all", perhaps I confused something. (Or am 
confusing something now.)

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