Solr
  1. Solr
  2. SOLR-7619

SegmentsInfoRequestHandlerTest failure

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2, 5.3, 6.0
    • Fix Version/s: 5.3
    • Component/s: Tests
    • Labels:
      None

      Description

      Reproducible failure on trunk & 5.2 release branch:

      ant test  -Dtestcase=SegmentsInfoRequestHandlerTest -Dtests.seed=194C71A0BDF1668A -Dtests.multiplier=2 -Dtests.nightly=true
      

      Both -Dtests.multiplier=2 and -Dtests.nightly=true are required to reproduce.

      FAILED:  org.apache.solr.handler.admin.SegmentsInfoRequestHandlerTest.testSegmentInfosData
      
      Error Message:
      Exception during query
      
      Stack Trace:
      java.lang.RuntimeException: Exception during query
      	at __randomizedtesting.SeedInfo.seed([194C71A0BDF1668A:65E553FB0B19D115]:0)
      	at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:794)
      	at org.apache.solr.handler.admin.SegmentsInfoRequestHandlerTest.testSegmentInfosData(SegmentsInfoRequestHandlerTest.java:59)
      [...]
      Caused by: java.lang.RuntimeException: REQUEST FAILED: xpath=5=//lst[@name='segments']/lst[1]/int[@name='size']
      	xml response was: <?xml version="1.0" encoding="UTF-8"?>
      <response>
      <lst name="responseHeader"><int name="status">0</int><int name="QTime">0</int></lst><lst name="segments"><lst name="_0"><str name="name">_0</str><int name="delCount">1</int><long name="sizeInBytes">2042</long><int name="size">4</int><date name="age">2015-06-01T19:57:31.221Z</date><str name="source">flush</str></lst><lst name="_1"><str name="name">_1</str><int name="delCount">0</int><long name="sizeInBytes">1864</long><int name="size">1</int><date name="age">2015-06-01T19:57:31.224Z</date><str name="source">flush</str></lst></lst>
      </response>
      
      	request was:wt=xml&qt=/admin/segments
      	at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:787)
      	... 40 more
      
      
      FAILED:  org.apache.solr.handler.admin.SegmentsInfoRequestHandlerTest.testSegmentInfos
      
      Error Message:
      Exception during query
      
      Stack Trace:
      java.lang.RuntimeException: Exception during query
      	at __randomizedtesting.SeedInfo.seed([194C71A0BDF1668A:551BE61F77FDBEDA]:0)
      	at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:794)
      	at org.apache.solr.handler.admin.SegmentsInfoRequestHandlerTest.testSegmentInfos(SegmentsInfoRequestHandlerTest.java:52)
      [...]
      Caused by: java.lang.RuntimeException: REQUEST FAILED: xpath=1=count(//lst[@name='segments']/lst)
      	xml response was: <?xml version="1.0" encoding="UTF-8"?>
      <response>
      <lst name="responseHeader"><int name="status">0</int><int name="QTime">0</int></lst><lst name="segments"><lst name="_2"><str name="name">_2</str><int name="delCount">1</int><long name="sizeInBytes">2042</long><int name="size">4</int><date name="age">2015-06-01T19:57:31.239Z</date><str name="source">flush</str></lst><lst name="_3"><str name="name">_3</str><int name="delCount">0</int><long name="sizeInBytes">1864</long><int name="size">1</int><date name="age">2015-06-01T19:57:31.242Z</date><str name="source">flush</str></lst></lst>
      </response>
      
      	request was:wt=xml&qt=/admin/segments
      	at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:787)
      	... 40 more
      
      1. SOLR-7619.patch
        1 kB
        Ramkumar Aiyengar

        Activity

        Hide
        Ramkumar Aiyengar added a comment -

        Attached is a patch to fix this failure.

        I looked into this, and looks like the reason behind this is that the following sequence:

        add 5 documents
        delete 1 document
        commit
        

        Somehow leads to two segments being created, one with four documents, and the other with 1. I can't imagine the soft commit frequency being hit or something like that, but may be some other test parameter deep in Lucene is triggering this – I haven't been able to figure out why.

        Since this test doesn't aim to verify Lucene behaviour anyway, I modified the test case to account for multiple segments..

        Show
        Ramkumar Aiyengar added a comment - Attached is a patch to fix this failure. I looked into this, and looks like the reason behind this is that the following sequence: add 5 documents delete 1 document commit Somehow leads to two segments being created, one with four documents, and the other with 1. I can't imagine the soft commit frequency being hit or something like that, but may be some other test parameter deep in Lucene is triggering this – I haven't been able to figure out why. Since this test doesn't aim to verify Lucene behaviour anyway, I modified the test case to account for multiple segments..
        Hide
        ASF subversion and git services added a comment -

        Commit 1685433 from Ramkumar Aiyengar in branch 'dev/trunk'
        [ https://svn.apache.org/r1685433 ]

        SOLR-7619: Fix SegmentsInfoRequestHandlerTest when more than one segment is created

        Show
        ASF subversion and git services added a comment - Commit 1685433 from Ramkumar Aiyengar in branch 'dev/trunk' [ https://svn.apache.org/r1685433 ] SOLR-7619 : Fix SegmentsInfoRequestHandlerTest when more than one segment is created
        Hide
        ASF subversion and git services added a comment -

        Commit 1685434 from Ramkumar Aiyengar in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1685434 ]

        SOLR-7619: Fix SegmentsInfoRequestHandlerTest when more than one segment is created

        Show
        ASF subversion and git services added a comment - Commit 1685434 from Ramkumar Aiyengar in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1685434 ] SOLR-7619 : Fix SegmentsInfoRequestHandlerTest when more than one segment is created
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Ramkumar Aiyengar
            Reporter:
            Steve Rowe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development