You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2020/11/09 13:17:01 UTC

[lucene-solr] branch master updated: SOLR-14969: Prevent creating multiple cores with the same name which leads to instabilities (race condition) changed error code

This is an automated email from the ASF dual-hosted git repository.

erick pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new be19432  SOLR-14969: Prevent creating multiple cores with the same name which leads to instabilities (race condition) changed error code
be19432 is described below

commit be19432b750b94c4703ee7b19ef681ebf771a95a
Author: Erick Erickson <Er...@gmail.com>
AuthorDate: Mon Nov 9 08:16:43 2020 -0500

    SOLR-14969: Prevent creating multiple cores with the same name which leads to instabilities (race condition) changed error code
---
 solr/core/src/java/org/apache/solr/core/CoreContainer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index 831f81e..e775102 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -1280,7 +1280,7 @@ public class CoreContainer {
         } else {
           String msg = "Already creating a core with name '" + coreName + "', call aborted '";
           log.warn(msg);
-          throw new SolrException(ErrorCode.SERVER_ERROR, msg);
+          throw new SolrException(ErrorCode.CONFLICT, msg);
         }
       }
       CoreDescriptor cd = new CoreDescriptor(coreName, instancePath, parameters, getContainerProperties(), getZkController());