Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-15292: SignatureUpdateProcessorFactory will fail to initialize if it is used in a SolrCloud cluster in a way that is known to be problematic with multiple replicas

Chris Hostetterebe6e4e15611
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 29aff66a78f..945d0df047c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -233,6 +233,9 @@ Other Changes
* SOLR-15121: Move XSLT (tr param) response writer and update request handler to scripting contrib. (Eric Pugh, David Smiley)
+* SOLR-15292: SignatureUpdateProcessorFactory will fail to initialize if it is used in a SolrCloud cluster in a way that is
+ known to be problematic with multiple replicas. (hossman)
+
Bug Fixes
---------------------
* SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java
index a899ec78eb6..43ed1b949f1 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java
@@ -16,7 +16,6 @@
*/
package org.apache.solr.update.processor;
import java.io.IOException;
-import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -38,8 +37,6 @@ import org.apache.solr.schema.IndexSchema;
import org.apache.solr.schema.SchemaField;
import org.apache.solr.util.plugin.SolrCoreAware;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* @since 3.1
@@ -48,7 +45,7 @@ public class SignatureUpdateProcessorFactory
extends UpdateRequestProcessorFactory
implements SolrCoreAware {
- private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
private List<String> sigFields;
private String signatureField;
@@ -104,9 +101,9 @@ public class SignatureUpdateProcessorFactory
if (getOverwriteDupes() && (null != core.getCoreDescriptor().getCloudDescriptor()) ) {
// Not Safe, see SOLR-3473 + SOLR-15290
if ( ! field.equals(schema.getUniqueKeyField()) ) {
- // TODO: throw new SolrException(ErrorCode.SERVER_ERROR, ...
- log.error("Can't use overwriteDupes safely in SolrCloud when signatureField is not the uniqueKeyField: {}",
- schema.getUniqueKeyField().getName());
+ throw new SolrException(ErrorCode.SERVER_ERROR,
+ "Can't use overwriteDupes safely in SolrCloud when signatureField is not the uniqueKeyField: "
+ + schema.getUniqueKeyField().getName());
}
}
}