imply-cheddar commented on a change in pull request #12293:
URL: https://github.com/apache/druid/pull/12293#discussion_r817225693
##########
File path:
extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/cache/CacheScheduler.java
##########
@@ -387,10 +379,11 @@ public String toString()
final CacheHandler cacheHandler;
final String version;
- private VersionedCache(String entryId, String version)
+ private VersionedCache(String entryId, String version, CacheHandler cache)
{
this.entryId = entryId;
- this.cacheHandler = cacheManager.createCache();
+ this.cacheHandler = cache;
+ cacheManager.attachCache(cache);
Review comment:
This is doing work in the constructor. That's a pattern that often
creates sadness. Given that `cacheManager` is a field on the parent object
here, can we move the attachCache into the `swapCacheState` method maybe?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]