尝试使用 Solr 8.1.1 设置单向 CDCR,
在源日志中将数据目录从源副本同步到目标副本(1 到 1)后,我看到:
2020-03-09 11:04:28.873 INFO (cdcr-replicator-17-thread-4) [ ] o.a.s.h.CdcrReplicator Forwarded 0 updates to target search1
2020-03-09 11:04:30.872 INFO (cdcr-replicator-17-thread-5) [ ] o.a.s.h.CdcrReplicator Forwarded 0 updates to target search1
2020-03-09 11:04:32.873 INFO (cdcr-replicator-17-thread-6) [ ] o.a.s.h.CdcrReplicator Forwarded 0 updates to target search1
2020-03-09 11:04:34.873 INFO (cdcr-replicator-17-thread-7) [ ] o.a.s.h.CdcrReplicator Forwarded 0 updates to target search1
2020-03-09 11:04:36.873 INFO (cdcr-replicator-17-thread-8) [ ] o.a.s.h.CdcrReplicator Forwarded 0 updates to target search1
我在源集合上启动了 CDCR,当我将新数据索引到源集合中时,出现以下错误:
2020-03-09 11:14:22.933 ERROR (cdcr-replicator-17-thread-5) [ ] o.a.s.c.s.i.BaseCloudSolrClient Request to collection [search1] failed due to (409) org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://10.11.33.159:8983/solr/search1_shard1_replica_n1: version conflict for THREE_INDEXING_01 expected=1660684743870513152 actual=-1, retry=0 commError=false errorCode=409
2020-03-09 11:14:22.933 INFO (cdcr-replicator-17-thread-5) [ ] o.a.s.c.s.i.BaseCloudSolrClient request was not communication error it seems
2020-03-09 11:14:22.933 WARN (cdcr-replicator-17-thread-5) [ ] o.a.s.h.CdcrReplicator Failed to forward update request to target: search1 => org.apache.solr.client.solrj.impl.CloudSolrClient$RouteException: Error from server at http://10.11.33.159:8983/solr/search1_shard1_replica_n1: version conflict for THREE_INDEXING_01 expected=1660684743870513152 actual=-1
at org.apache.solr.client.solrj.impl.CloudSolrClient.getRouteException(CloudSolrClient.java:125)
org.apache.solr.client.solrj.impl.CloudSolrClient$RouteException: Error from server at http://10.11.33.159:8983/solr/search1_shard1_replica_n1: version conflict for THREE_INDEXING_01 expected=1660684743870513152 actual=-1
at org.apache.solr.client.solrj.impl.CloudSolrClient.getRouteException(CloudSolrClient.java:125) ~[?:?]
at org.apache.solr.client.solrj.impl.CloudSolrClient.getRouteException(CloudSolrClient.java:46) ~[?:?]
at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.directUpdate(BaseCloudSolrClient.java:489) ~[?:?]
at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.sendRequest(BaseCloudSolrClient.java:977) ~[?:?]
at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.requestWithRetryOnStaleState(BaseCloudSolrClient.java:837) ~[?:?]
at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.request(BaseCloudSolrClient.java:769) ~[?:?]
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:207) ~[?:?]
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:224) ~[?:?]
at org.apache.solr.handler.CdcrReplicator.sendRequest(CdcrReplicator.java:140) ~[?:?]
at org.apache.solr.handler.CdcrReplicator.run(CdcrReplicator.java:120) ~[?:?]
at org.apache.solr.handler.CdcrReplicatorScheduler.lambda$null$0(CdcrReplicatorScheduler.java:81) ~[?:?]
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:209) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://10.11.33.159:8983/solr/search1_shard1_replica_n1: version conflict for THREE_INDEXING_01 expected=1660684743870513152 actual=-1
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:649) ~[?:?]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255) ~[?:?]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244) ~[?:?]
at org.apache.solr.client.solrj.impl.LBSolrClient.doRequest(LBSolrClient.java:368) ~[?:?]
at org.apache.solr.client.solrj.impl.LBSolrClient.request(LBSolrClient.java:296) ~[?:?]
at org.apache.solr.client.solrj.impl.BaseCloudSolrClient.lambda$directUpdate$0(BaseCloudSolrClient.java:465) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_232]
... 4 more