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/09/26 10:36:48 UTC

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

FaxianZhao commented on a change in pull request #8272: Support incremental load in Druid lookups
URL: https://github.com/apache/incubator-druid/pull/8272#discussion_r328550816
 
 

 ##########
 File path: extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/cache/CacheScheduler.java
 ##########
 @@ -197,6 +197,17 @@ public void run()
       }
     }
 
+    public VersionedCache createFromExistingCache(
+        @Nullable EntryImpl<? extends ExtractionNamespace> entryId,
+        String version,
+        Map<String, String> newCacheEntries
+    )
+    {
+      VersionedCache state = (VersionedCache) cacheStateHolder.get();
 
 Review comment:
   How about only update the original VersionedCache's version and  return it back, when the previous CacheState is not instance of NoCache. So we needn't care about closing race.
   Then check if the generated cache is same as cacheStateHolder, treat updatedCacheSuccessfully as true.

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