Hi,

I am writing a custom Solr plugin and I need to add a check to make sure
that all the cores in the node are loaded before proceeding with later code
execution.

Following is what the code looks like. What I am observing though is that
the later code gets executed even if all the cores are not loaded. What
could be the problem?

    public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse
resp) throws Exception {
        CoreContainer coreContainer = req.getCore().getCoreContainer();

        // make sure all cores are loaded
        coreContainer.waitForLoadingCoresToFinish(Long.MAX_VALUE);

        // code that should be executed only after all cores are loaded

Reply via email to