SOLR-14969: Prevent creating multiple cores with the same name which leads to instabilities (race condition) changed error code

This commit is contained in:
Erick Erickson 2020-11-09 08:16:43 -05:00
parent 0bfa2a6908
commit be19432b75
1 changed files with 1 additions and 1 deletions

View File

@ -1280,7 +1280,7 @@ public class CoreContainer {
} else { } else {
String msg = "Already creating a core with name '" + coreName + "', call aborted '"; String msg = "Already creating a core with name '" + coreName + "', call aborted '";
log.warn(msg); 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()); CoreDescriptor cd = new CoreDescriptor(coreName, instancePath, parameters, getContainerProperties(), getZkController());