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:28:41 UTC

[lucene-solr] branch branch_8x 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 branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


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

commit 91ef1c0fe8854db04e42b9095437b3186ff8038e
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
    
    (cherry picked from commit be19432b750b94c4703ee7b19ef681ebf771a95a)
---
 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 1ae652b..f3b874f 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -1281,7 +1281,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());