You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2022/10/14 20:20:14 UTC

[solr] branch main updated: SOLR-16302: WARN when restoring backup if ConfigSet with same name already exists (#1009)

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

krisden pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d398124c18 SOLR-16302: WARN when restoring backup if ConfigSet with same name already exists (#1009)
6d398124c18 is described below

commit 6d398124c180e9a17653ba481f79b8cafbd68821
Author: Albert Moser <63...@users.noreply.github.com>
AuthorDate: Fri Oct 14 22:20:08 2022 +0200

    SOLR-16302: WARN when restoring backup if ConfigSet with same name already exists (#1009)
    
    Co-authored-by: Christine Poerschke <cp...@apache.org>
    Co-authored-by: Kevin Risden <kr...@apache.org>
---
 solr/CHANGES.txt                                                      | 2 ++
 .../src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java    | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

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);