Solr
  1. Solr
  2. SOLR-8196

TestMiniSolrCloudCluster.testStopAllStartAll case plus necessary MiniSolrCloudCluster tweak

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Background to this seemingly boring TestMiniSolrCloudCluster.testStopAllStartAll case is trying to reproduce leadership/election issues observed whilst evaluating 4.10.4 - neither branch_5x nor trunk had the issues but MiniSolrCloudCluster needed a little tweak to make the test case work: if the same solr/jetty home directory is used for multiple jetties then stopping and starting resulted in them all discovering the same cores ...

      1. SOLR-8196.patch
        13 kB
        Christine Poerschke

        Activity

        Hide
        Christine Poerschke added a comment -

        Attaching proposed patch against trunk. The changes to MiniSolrCloudCluster are kept to a minimum.

        Show
        Christine Poerschke added a comment - Attaching proposed patch against trunk. The changes to MiniSolrCloudCluster are kept to a minimum.
        Hide
        Mark Miller added a comment -

        +1

        Show
        Mark Miller added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1710824 from Christine Poerschke in branch 'dev/trunk'
        [ https://svn.apache.org/r1710824 ]

        SOLR-8196: TestMiniSolrCloudCluster.testStopAllStartAll case plus necessary MiniSolrCloudCluster tweak

        Show
        ASF subversion and git services added a comment - Commit 1710824 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1710824 ] SOLR-8196 : TestMiniSolrCloudCluster.testStopAllStartAll case plus necessary MiniSolrCloudCluster tweak
        Hide
        ASF subversion and git services added a comment -

        Commit 1710844 from Christine Poerschke in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1710844 ]

        SOLR-8196: TestMiniSolrCloudCluster.testStopAllStartAll case plus necessary MiniSolrCloudCluster tweak (merge in revision 1710824 from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1710844 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1710844 ] SOLR-8196 : TestMiniSolrCloudCluster.testStopAllStartAll case plus necessary MiniSolrCloudCluster tweak (merge in revision 1710824 from trunk)
        Hide
        Alan Woodward added a comment -

        Bit late to nitpick, sorry, but instead of passing in an optional array of paths for jetties, could we instead force each one to create a subdirectory somehow? It seems a bit neater than adding an extra parameter.

        Show
        Alan Woodward added a comment - Bit late to nitpick, sorry, but instead of passing in an optional array of paths for jetties, could we instead force each one to create a subdirectory somehow? It seems a bit neater than adding an extra parameter.
        Hide
        Christine Poerschke added a comment -

        Never too late to nitpick. I agree the optional array of paths solution is not that nice. Historically e.g. in https://github.com/apache/lucene-solr/blob/lucene_solr_4_8/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java MiniSolrCloudCluster created the directory itself but that got moved up to the caller (haven't yet delved into when or why) subsequently. Conceptually if the caller passed something that could create subdirectories then MiniSolrCloudCluster could create as many or as few subdirectories as are needed.

        Semi-related ticket, SOLR-7886 for factoring out a TestMiniSolrCloudClusterBase class (these comments here for MiniSolrCloudCluster itself).

        Show
        Christine Poerschke added a comment - Never too late to nitpick. I agree the optional array of paths solution is not that nice. Historically e.g. in https://github.com/apache/lucene-solr/blob/lucene_solr_4_8/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java MiniSolrCloudCluster created the directory itself but that got moved up to the caller (haven't yet delved into when or why) subsequently. Conceptually if the caller passed something that could create subdirectories then MiniSolrCloudCluster could create as many or as few subdirectories as are needed. Semi-related ticket, SOLR-7886 for factoring out a TestMiniSolrCloudClusterBase class (these comments here for MiniSolrCloudCluster itself).

          People

          • Assignee:
            Christine Poerschke
            Reporter:
            Christine Poerschke
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development