kfaraz commented on code in PR #16328:
URL: https://github.com/apache/druid/pull/16328#discussion_r1579321809
##########
server/src/main/java/org/apache/druid/query/lookup/LookupReferencesManager.java:
##########
@@ -373,10 +375,18 @@ private void takeSnapshot(Map<String,
LookupExtractorFactoryContainer> lookupMap
}
}
- private void loadAllLookupsAndInitStateRef()
+ /**
+ * Load a set of lookups based on the injected value in {@link
DataSourceTaskIdHolder#getLookupsToLoad()}.
+ */
+ private void loadLookupsAndInitStateRef()
{
List<LookupBean> lookupBeanList = getLookupsList();
if (lookupBeanList != null) {
+ final List<String> lookupsToLoad =
lookupListeningAnnouncerConfig.getLookupsToLoad();
+ final boolean loadAllLookups = lookupsToLoad == null;
+ lookupBeanList = lookupBeanList.stream()
Review Comment:
I am not sure if not doing the iteration is really going to help,
performance-wise.
As opposed to this, a more beneficial optimisation would be to not fetch any
lookups from coordinator if none need to be loaded.
--
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]