swapneshgandhi commented on a change in pull request #8272: Support incremental
load in Druid lookups
URL: https://github.com/apache/incubator-druid/pull/8272#discussion_r340344805
##########
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
I am trying to understand this, even if we `VersionedCacheBuilder` we need
some kind of `if` condition on when we actually close the `CacheHandler` and
when we don't.
I think that part is still not clear.
Previously, I was doing that by not calling close method in
`scheduleAndWait` when IncrementalLoad was happening. Feels like that's the
point in time when we need stop closing the `CacheHandler` going forward.
----------------------------------------------------------------
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]