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

Distributed result set paging sometimes yields incorrect results



    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not A Problem
    • Affects Version/s: 6.4
    • Fix Version/s: 6.5, 7.0
    • Labels:


      This bug appeared in 6.4 and i spotted it yesterday when i upgraded a my project. It has, amongst others,an extension of QueryComponent, its unit test failed, but never in any predictable way and always in another spot.

      The test is very straightforward, it indexes a bunch of silly documents and then executes a series of getAll() queries. An array of ids is collected and stored for comparison. Then, the same query is executed again but it pages through the entire result set.
      It then compares ids, the id at position N must be the same as id NUM_PAGE * PAGE_SIZE + M (where M is the position of the result in the paged set). The comparison sometimes failes.

      I'll attach the test for 6.4 shortly. If it passes, just try it again (or increase maxDocs). It can pass over ten times in a row, but it can also fail ten times in a row.

      You should see this if it fails, but probably with different values for expected and actual. Below was a few minutes ago, now i can't seem to reproduce it anymore.

         [junit4] FAILURE 25.1s | DistributedPagedQueryComponentTest.testTheCrazyPager <<<
         [junit4]    > Throwable #1: java.lang.AssertionError: ids misaligned expected:<406> but was:<811>
         [junit4]    >        at __randomizedtesting.SeedInfo.seed([97A7F02D1E4ACF75:7493130F03129E6D]:0)
         [junit4]    >        at org.apache.solr.handler.component.DistributedPagedQueryComponentTest.testTheCrazyPager(DistributedPagedQueryComponentTest.java:83)
         [junit4]    >        at org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsFixedStatement.callStatement(BaseDistributedSearchTestCase.java:992)
         [junit4]    >        at org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsStatement.evaluate(BaseDistributedSearchTestCase.java:967)
         [junit4]    >        at java.lang.Thread.run(Thread.java:745)




            • Assignee:
              markus17 Markus Jelsma
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: