Solr
  1. Solr
  2. SOLR-2320

ReplicationHandler doesn't return master details unless it's also configured as a slave

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4, 1.4.1
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: replication (java)
    • Labels:
      None

      Description

      While investigating SOLR-2314 i found a bug which seems to be the opposite of the behavior described there – so i'm filing a seperate bug to track it.

      if ReplicationHandler is only configured as a master, "command=details" requests won't include the "master" section. that section is only output if it is also configured as a slave.

      the method responsible for the details command generates the "master" details just fine, but the code to add it to the response seems to have erroneously been nested inside an if that only evaluates to true if there is a non-null SnapPuller (ie: it's also a slave)

      1. SOLR-2320.patch
        14 kB
        Hoss Man
      2. SOLR-2320.patch
        3 kB
        Hoss Man
      3. SOLR-2320.patch
        0.8 kB
        Hoss Man

        Issue Links

          Activity

          Hide
          Hoss Man added a comment -

          simple patch moving the code for adding the details out of the nested conditional.

          hoping someone who understands replication better then me can sanity check this.

          Show
          Hoss Man added a comment - simple patch moving the code for adding the details out of the nested conditional. hoping someone who understands replication better then me can sanity check this.
          Hide
          Hoss Man added a comment -

          Updated patch that includes a really trivial test of the details command (which fails w/o the previously mentioned fix)

          Show
          Hoss Man added a comment - Updated patch that includes a really trivial test of the details command (which fails w/o the previously mentioned fix)
          Hide
          Hoss Man added a comment -

          enhanced the test to also look at the details command for a repeater.

          this required some rather invasive refactoring of the test in order to be able to construct a SolrInstance which was both a master and a slave – but i think on the whole the test is improved (logic added for dealing with arbitrary "solrconfig-$

          {name}

          .xml" files in SolrInstance constructor, and a lot of config file copying was refactored into common methods)

          If there are no objections, i'll commit ASAP.

          Show
          Hoss Man added a comment - enhanced the test to also look at the details command for a repeater. this required some rather invasive refactoring of the test in order to be able to construct a SolrInstance which was both a master and a slave – but i think on the whole the test is improved (logic added for dealing with arbitrary "solrconfig-$ {name} .xml" files in SolrInstance constructor, and a lot of config file copying was refactored into common methods) If there are no objections, i'll commit ASAP.
          Hide
          Hoss Man added a comment -

          Committed revision 1063339. - trunk
          Committed revision 1063343. - 3x

          Show
          Hoss Man added a comment - Committed revision 1063339. - trunk Committed revision 1063343. - 3x
          Hide
          Grant Ingersoll added a comment -

          Bulk close for 3.1.0 release

          Show
          Grant Ingersoll added a comment - Bulk close for 3.1.0 release

            People

            • Assignee:
              Hoss Man
              Reporter:
              Hoss Man
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development