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

Possible data loss when index of tlog replica is not empty but latestVersions of master equals 0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2, master (8.0)
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      From ReplicationHandler

            if (latestVersion == 0L) {
              if (forceReplication && commit.getGeneration() != 0) {
                solrCore.getIndexWriter().deleteAll();
                solrCore.getUpdateHandler().commit(new CommitUpdateCommand(req, false));
              }
              return success;
            }
      

      The inconsistent happens when commit version of master equals 0 but tlog replica does not clear its index.

      https://jenkins.thetaphi.de/job/Lucene-Solr-master-MacOSX/4140/testReport/org.apache.solr.cloud/HttpPartitionTest/test/

      Error Message
      
      Doc with id=1 not found in http://127.0.0.1:60897/b/xj/collMinRf_1x3 due to: Path not found: /id; rsp={doc=null}
      Stacktrace
      
      java.lang.AssertionError: Doc with id=1 not found in http://127.0.0.1:60897/b/xj/collMinRf_1x3 due to: Path not found: /id; rsp={doc=null}
      	at __randomizedtesting.SeedInfo.seed([ACF841744A332569:24AC7EAEE4CF4891]:0)
      	at org.junit.Assert.fail(Assert.java:93)
      	at org.junit.Assert.assertTrue(Assert.java:43)
      	at org.apache.solr.cloud.HttpPartitionTest.assertDocExists(HttpPartitionTest.java:603)
      	at org.apache.solr.cloud.HttpPartitionTest.assertDocsExistInAllReplicas(HttpPartitionTest.java:558)
      	at org.apache.solr.cloud.HttpPartitionTest.testMinRf(HttpPartitionTest.java:249)
      	at org.apache.solr.cloud.HttpPartitionTest.test(HttpPartitionTest.java:127)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      

        Attachments

        1. SOLR-11293.patch
          17 kB
          Cao Manh Dat
        2. SOLR-11293.patch
          10 kB
          Cao Manh Dat
        3. SOLR-11293.patch
          10 kB
          Cao Manh Dat
        4. SOLR-11293.patch
          5 kB
          Noble Paul

          Issue Links

            Activity

              People

              • Assignee:
                caomanhdat Cao Manh Dat
                Reporter:
                noble.paul Noble Paul
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: