Solr
  1. Solr
  2. SOLR-2958

SolrEntityProcessor prematurely ending when performing doQuery()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.6
    • Labels:
      None

      Description

      from my memory...
      doQuery() method is incorrectly setting finished = true; during the condition below..
      Scenario:
      numFound=720
      rows=500
      error:last 220 records are not returned.

      Replacing query.getStart() (which is essentially 500 + 500 > 720 => TRUE) with 1 has worked for us.

      if (context.isRootEntity()) {
      // only check the numFound end condition if we're the root entity, otherwise the query could be changing each time
      // if (currentRow + query.getStart() > numFound) {
      if ((currentRow + 1 > numFound) && (numFound > 0))

      { finished = true; return; }
      1. SOLR-2958.patch
        3 kB
        Martijn van Groningen

        Activity

        Andrew Gunther created issue -
        Hide
        Martijn van Groningen added a comment -

        Does this affect the code committed with SOLR-1499?
        You set the affect versions to 3.2, so I'm not sure.

        Show
        Martijn van Groningen added a comment - Does this affect the code committed with SOLR-1499 ? You set the affect versions to 3.2, so I'm not sure.
        Hide
        Andrew Gunther added a comment -

        Our solr source tree is 3.2 although the problem is still present in the last SOLR-1499 patch so it is all versions.

        Show
        Andrew Gunther added a comment - Our solr source tree is 3.2 although the problem is still present in the last SOLR-1499 patch so it is all versions.
        Hide
        Martijn van Groningen added a comment -

        I tried to reproduce the bug, but I didn't run into the bug on the Solr instance I have access to.

        I also added a test case to the issue.
        In this test case 720 documents are added. The dih configured with the SolrEntityProcessor (with rows=500) imports these documents into another Solr instance.
        This test passes now.

        Can you run this test in your environment?

        Show
        Martijn van Groningen added a comment - I tried to reproduce the bug, but I didn't run into the bug on the Solr instance I have access to. I also added a test case to the issue. In this test case 720 documents are added. The dih configured with the SolrEntityProcessor (with rows=500) imports these documents into another Solr instance. This test passes now. Can you run this test in your environment?
        Martijn van Groningen made changes -
        Field Original Value New Value
        Attachment SOLR-2958.patch [ 12506801 ]
        Hide
        Andrew Gunther added a comment -

        my mistake as I was comparing to a non-trunk version of SOLR-1499 patch.
        All is well and issue can be closed. thanks for the test cases.

        Show
        Andrew Gunther added a comment - my mistake as I was comparing to a non-trunk version of SOLR-1499 patch. All is well and issue can be closed. thanks for the test cases.
        Hide
        Andrew Gunther added a comment -

        trunk patch of SOLR 1499 provided refactoring which resolved the problem

        Show
        Andrew Gunther added a comment - trunk patch of SOLR 1499 provided refactoring which resolved the problem
        Andrew Gunther made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 3.6 [ 12319065 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Andrew Gunther
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development