private void lookupPropertyOverridesInZk()

in crossdc-producer/src/main/java/org/apache/solr/update/processor/MirroringUpdateRequestProcessorFactory.java [133:160]


    private void lookupPropertyOverridesInZk(SolrCore core) {
        log.info("Producer startup config properties before adding additional properties from Zookeeper={}", properties);

        try {
            SolrZkClient solrZkClient = core.getCoreContainer().getZkController().getZkClient();
            ConfUtil.fillProperties(solrZkClient, properties);
            applyArgsOverrides();
            CollectionProperties cp = new CollectionProperties(solrZkClient);
            Map<String,String> collectionProperties = cp.getCollectionProperties(core.getCoreDescriptor().getCollectionName());
            for (ConfigProperty configKey : KafkaCrossDcConf.CONFIG_PROPERTIES) {
                String val = collectionProperties.get("crossdc." + configKey.getKey());
                if (val != null && !val.isBlank()) {
                    properties.put(configKey.getKey(), val);
                }
            }
            String enabledVal = collectionProperties.get("crossdc.enabled");
            if (enabledVal != null) {
                if (Boolean.parseBoolean(enabledVal.toString())) {
                    this.enabled = true;
                } else {
                    this.enabled = false;
                }
            }
        } catch (Exception e) {
            log.error("Exception looking for CrossDC configuration in Zookeeper", e);
            throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Exception looking for CrossDC configuration in Zookeeper", e);
        }
    }