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

MiniSolrCloudCluster internal jetty list should never have duplicates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 7.4
    • 7.5, 8.0
    • Tests
    • None

    Description

      MiniSolrCloudCluster has a startJettySolrRunner method and a corresponding stopJettySolrRunner method. While the former adds the given jetty instance to the internal list of jetty instances, the latter does not remove the given instance from the list. This leads to inconsistencies e.g.

      1. If a node is restarted using these two methods, the final list will contain a duplicate instance of jetty.
      2. If a node is shutdown, it remains in the list (in the closed state) so trying to use its method such as getNode will throw an exception

      We should fix the stopJettySolrRunner method to remove the jetty from the internal list. This change in behavior can potentially break test code but I think it is a valid bug that should be fixed.

      The startJettySolrRunner method too, adds the given instance to the internal list without checking whether it exists already or not. That too should be fixed.

      Attachments

        1. SOLR-12679.patch
          2 kB
          Shalin Shekhar Mangar

        Activity

          People

            shalin Shalin Shekhar Mangar
            shalin Shalin Shekhar Mangar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: