Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9203

Cross Data Center Replication for existing Indexes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.0
    • Fix Version/s: None
    • Component/s: CDCR
    • Labels:
      None

      Description

      Hi all,

      After several attempts I am unable to get CDCR working for a solr core with existing documents.

      My first attempt failed due to incompatibility with the tlog file names,

      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1967)
      at org.apache.solr.update.CdcrUpdateLog.getLastLogId(CdcrUpdateLog.java:154)
      at org.apache.solr.update.UpdateLog.init(UpdateLog.java:282)
      at org.apache.solr.update.CdcrUpdateLog.init(CdcrUpdateLog.java:77)
      at org.apache.solr.update.UpdateHandler.<init>(UpdateHandler.java:137)

      This is going from having an update handler of
      <updateLog>
      <str name="dir">/somedir/</str>
      </updateLog>

      to
      <updateLog class="solr.CdcrUpdateLog">
      <str name="dir">/somedir</str>
      </updateLog>

      I believe this is due to the file patterns differing for the default update log class and the CdcrUpdateLog class.

      I then continued to follow https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=62687462#CrossDataCenterReplication(CDCR)-FirstTime

      which does not describe having the CdcrUpdateLog class, to which solr will now start erroring with

      Caused by: org.apache.solr.common.SolrException: Solr instance is not configured with the cdcr update log.
      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:771)
      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:642)
      at org.apache.solr.core.CoreContainer.create(CoreContainer.java:817)
      at org.apache.solr.core.CoreContainer.access$000(CoreContainer.java:88)
      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:468)
      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:459)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      ... 1 more
      Caused by: org.apache.solr.common.SolrException: Solr instance is not configured with the cdcr update log.
      at org.apache.solr.handler.CdcrRequestHandler.inform(CdcrRequestHandler.java:223)
      at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:675)
      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:751)
      ... 10 more

      I may have completely missunderstood but please advise?

      Thanks

      Mike

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mikerocke1989@gmail.com Mike Rocke
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: