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

Add a test to make sure that a leader always recovers from log on startup

    Details

    • Type: Test
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3, 7.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      From my comment on SOLR-4997:

      I fixed a bug that I had introduced which skipped log recovery on startup for all leaders instead of only sub shard leaders. I caught this only because I was doing another line-by-line review of all my changes. We should have a test which catches such a condition.

      Add a test which tests that leaders always recover from log on startup.

      1. SOLR-5401.patch
        3 kB
        Cao Manh Dat
      2. SOLR-5041.patch
        8 kB
        Vitaliy Zhovtyuk

        Activity

        Hide
        thetaphi Uwe Schindler added a comment -

        Move issue to Solr 4.9.

        Show
        thetaphi Uwe Schindler added a comment - Move issue to Solr 4.9.
        Hide
        vzhovtiuk Vitaliy Zhovtyuk added a comment -

        Added test to send updates and stop test server, then restart test server and commit. Added single and multiple shards tests.

        Show
        vzhovtiuk Vitaliy Zhovtyuk added a comment - Added test to send updates and stop test server, then restart test server and commit. Added single and multiple shards tests.
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Hi Vitaliy Zhovtyuk, this isn't testing what this issue requires. What we need to test is that a node must recover from logs on startup. Killing/restarting the zookeeper is not going to help.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Hi Vitaliy Zhovtyuk , this isn't testing what this issue requires. What we need to test is that a node must recover from logs on startup. Killing/restarting the zookeeper is not going to help.
        Hide
        caomanhdat Cao Manh Dat added a comment -

        Initial patch for this issue. In this test :

        • We start up a cluster 2x2
        • Index some docs ( do not run commit )
        • Restart the cluster
        • Make sure that all nodes is recover from log
        Show
        caomanhdat Cao Manh Dat added a comment - Initial patch for this issue. In this test : We start up a cluster 2x2 Index some docs ( do not run commit ) Restart the cluster Make sure that all nodes is recover from log
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 7a8ff69316809231e20883d5d45376bafb8f1262 in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7a8ff69 ]

        SOLR-5041: Add a test to make sure that a leader always recovers from log on startup

        Show
        jira-bot ASF subversion and git services added a comment - Commit 7a8ff69316809231e20883d5d45376bafb8f1262 in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7a8ff69 ] SOLR-5041 : Add a test to make sure that a leader always recovers from log on startup
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f8a4ccf97bea23446e3d323a4698b097aeff0068 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f8a4ccf ]

        SOLR-5041: Add a test to make sure that a leader always recovers from log on startup

        (cherry picked from commit 7a8ff69)

        Show
        jira-bot ASF subversion and git services added a comment - Commit f8a4ccf97bea23446e3d323a4698b097aeff0068 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f8a4ccf ] SOLR-5041 : Add a test to make sure that a leader always recovers from log on startup (cherry picked from commit 7a8ff69)
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Thanks Dat!

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Thanks Dat!
        Hide
        caomanhdat Cao Manh Dat added a comment -

        Thahnks a lot for reviewing the patch.

        Show
        caomanhdat Cao Manh Dat added a comment - Thahnks a lot for reviewing the patch.
        Hide
        varunthacker Varun Thacker added a comment -

        Hi Dat/Shalin,

        I was just going through this patch and I have a couple of doubts:

        1. Is {[cloudClient.commit();}} needed in the TestLeaderRecoverFromLogOnStartup test? It probably doesn't matter but just wanted to know if I am missing something.
        2. Should we extend SolrCloudTestCase instead of AbstractFullDistribZkTestBase in the test?

        Show
        varunthacker Varun Thacker added a comment - Hi Dat/Shalin, I was just going through this patch and I have a couple of doubts: 1. Is {[cloudClient.commit();}} needed in the TestLeaderRecoverFromLogOnStartup test? It probably doesn't matter but just wanted to know if I am missing something. 2. Should we extend SolrCloudTestCase instead of AbstractFullDistribZkTestBase in the test?
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Closing after 6.3.0 release.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Closing after 6.3.0 release.

          People

          • Assignee:
            shalinmangar Shalin Shekhar Mangar
            Reporter:
            shalinmangar Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development