Skip to content

Apache Lucene open-source search software

SOLR-14022: Deprecate CDCR

Ishan Chattopadhyaya7c593b1940fd
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1861ba5cc95..dc10360c70b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -436,6 +436,8 @@ Other Changes
* SOLR-14541: Ensure classes that implement equals implement hashCode or suppress warnings
(gezapeti, Ilan Ginsburg, Erick Erickson)
+* SOLR-14022: Deprecate CDCR (Joel Bernstein, Ishan Chattopadhyaya)
+
================== 8.5.2 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrBufferStateManager.java b/solr/core/src/java/org/apache/solr/handler/CdcrBufferStateManager.java
index 5a9add86231..49d19f1ad22 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrBufferStateManager.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrBufferStateManager.java
@@ -32,7 +32,9 @@ import java.nio.charset.Charset;
/**
* Manage the state of the update log buffer. It is responsible of synchronising the state
* through Zookeeper. The state of the buffer is stored in the zk node defined by {@link #getZnodePath()}.
+ * @deprecated since 8.6
*/
+@Deprecated(since = "8.6")
class CdcrBufferStateManager extends CdcrStateManager {
private CdcrParams.BufferState state = DEFAULT_STATE;
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrLeaderStateManager.java b/solr/core/src/java/org/apache/solr/handler/CdcrLeaderStateManager.java
index ac80c368056..c9bc5fdad3e 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrLeaderStateManager.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrLeaderStateManager.java
@@ -36,7 +36,9 @@ import org.slf4j.LoggerFactory;
* It takes care of notifying the {@link CdcrReplicatorManager} in case
* of a leader state change.
* </p>
+ * @deprecated since 8.6
*/
+@Deprecated(since = "8.6")
class CdcrLeaderStateManager extends CdcrStateManager {
private boolean amILeader = false;
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrProcessStateManager.java b/solr/core/src/java/org/apache/solr/handler/CdcrProcessStateManager.java
index 9b4cc80bd69..6506030bbce 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrProcessStateManager.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrProcessStateManager.java
@@ -36,7 +36,9 @@ import org.slf4j.LoggerFactory;
* It takes care of notifying the {@link CdcrReplicatorManager} in case
* of a process state change.
* </p>
+ * @deprecated since 8.6
*/
+@Deprecated(since = "8.6")
class CdcrProcessStateManager extends CdcrStateManager {
private CdcrParams.ProcessState state = DEFAULT_STATE;
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java b/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java
index 1f41cc3b9e0..936750e430a 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java
@@ -39,7 +39,9 @@ import static org.apache.solr.common.params.CommonParams.VERSION_FIELD;
* The replication logic. Given a {@link org.apache.solr.handler.CdcrReplicatorState}, it reads all the new entries
* in the update log and forward them to the target cluster. If an error occurs, the replication is stopped and
* will be tried again later.
+ * @deprecated since 8.6
*/
+@Deprecated(since = "8.6")
public class CdcrReplicator implements Runnable {
private final CdcrReplicatorState state;
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrReplicatorManager.java b/solr/core/src/java/org/apache/solr/handler/CdcrReplicatorManager.java
index 01a0c4de5c0..1f9d1f94cb3 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrReplicatorManager.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrReplicatorManager.java
@@ -56,6 +56,7 @@ import org.slf4j.LoggerFactory;
import static org.apache.solr.handler.admin.CoreAdminHandler.RESPONSE_STATUS;
+@Deprecated(since = "8.6")
class CdcrReplicatorManager implements CdcrStateManager.CdcrStateObserver {
private static final int MAX_BOOTSTRAP_ATTEMPTS = 5;
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
index e7211f46a8c..8e77a84092e 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
@@ -107,7 +107,9 @@ import static org.apache.solr.handler.admin.CoreAdminHandler.RUNNING;
* Known limitations: The source and target clusters must have the same topology. Replication between clusters
* with a different number of shards will likely results in an inconsistent index.
* </p>
+ * @deprecated since 8.6
*/
+@Deprecated(since = "8.6")
public class CdcrRequestHandler extends RequestHandlerBase implements SolrCoreAware {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -133,6 +135,8 @@ public class CdcrRequestHandler extends RequestHandlerBase implements SolrCoreAw
public void init(@SuppressWarnings({"rawtypes"})NamedList args) {
super.init(args);
+ log.warn("CDCR (in its current form) is deprecated as of 8.6 and shall be removed in 9.0. See SOLR-14022 for details.");
+
if (args != null) {
// Configuration of the Update Log Synchronizer
Object updateLogSynchonizerParam = args.get(CdcrParams.UPDATE_LOG_SYNCHRONIZER_PARAM);
diff --git a/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java b/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java
index fbf686157d2..86cee7148a0 100644
--- a/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java
+++ b/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java
@@ -43,7 +43,9 @@ import org.slf4j.LoggerFactory;
* decoded and reuse if the tlog file is reopened. This is achieved by extending the constructor, and the
* methods {@link #writeCommit(CommitUpdateCommand)} and {@link #getReader(long)}.</li>
* </ul>
+ * @deprecated since 8.6
*/
+@Deprecated(since = "8.6")
public class CdcrTransactionLog extends TransactionLog {
private boolean isReplaying;
diff --git a/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java
index fe13a91bdce..180784a3132 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java
@@ -36,7 +36,9 @@ import org.slf4j.LoggerFactory;
* for every updates. This ensures that the version parameter sent by the source cluster is kept
* by the target cluster.
* </p>
+ * @deprecated since 8.6
*/
+@Deprecated(since = "8.6")
public class CdcrUpdateProcessor extends DistributedZkUpdateProcessor {
public static final String CDCR_UPDATE = "cdcr.update";
diff --git a/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc b/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc
index 114d508da01..67747fd453f 100644
--- a/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc
+++ b/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc
@@ -17,6 +17,8 @@
// specific language governing permissions and limitations
// under the License.
+WARNING: This feature (in its current form) is deprecated as of 8.6 and shall be removed in 9.0. See SOLR-14022 for details.
+
Cross Data Center Replication (CDCR) allows you to create multiple SolrCloud data centers and keep them in sync.
== What is CDCR?
diff --git a/solr/solr-ref-guide/src/solr-upgrade-notes.adoc b/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
index 1fbe7475de2..1c1f1540eae 100644
--- a/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
+++ b/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
@@ -85,6 +85,10 @@ For more information about how to use this, see the section <<exporting-result-s
* The `stats`, `facet`, and `timeseries` expressions now support percentiles and standard deviation aggregations.
+*Deprecations*
+
+* Cross Data Center Replication (CDCR), in its current form, is deprecated and is scheduled to be removed in 9.0. Please refer to SOLR-14022.
+
=== Solr 8.5
See the https://cwiki.apache.org/confluence/display/SOLR/ReleaseNote85[8.5 Release Notes]