Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16302: WARN when restoring backup if ConfigSet with same name already exists (#1009)

Albert Moser6d398124c180
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6c410be3227..97b32e97f73 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -48,6 +48,8 @@ Improvements
* SOLR-11657: Deprecate ContentStream in favour of RequestWriter.ContentWriter. (Joshua Ouma via Eric Pugh)
+* SOLR-16302: WARN when restoring backup if ConfigSet with same name already exists (Albert Moser via Kevin Risden)
+
Optimizations
---------------------
(No changes)
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
index 770768c76e2..3a18fab6b37 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
@@ -320,7 +320,9 @@ public class RestoreCmd implements CollApiCmds.CollectionApiCommand {
ConfigSetService configSetService)
throws IOException {
if (configSetService.checkConfigExists(restoreConfigName)) {
- log.info("Using existing config {}", restoreConfigName);
+ log.warn(
+ "Config with name {} already exists. Skipping upload to Zookeeper and using existing config.",
+ restoreConfigName);
// TODO add overwrite option?
} else {
log.info("Uploading config {}", restoreConfigName);