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

TestSolrCLIRunExample failures indicating documents just indexed are not all searchable.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.6, 7.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      I've been beating the heck out of some test cases for fear that
      SOLR-10007 really messed things up and I can get a pretty regular test
      failure for TestSolrCLIRunExample.testInteractiveSolrCloudExample, but
      it doesn't make sense.

      So I went back to a revision before SOLR-10007 and it still fails.
      But the failure is "impossible". I put a bunch of log.error messages
      in and, for experimental purposes a for loop in the test. Here's the
      lines that fail in the original:

      for (idx = 0; idx < 10; ++idx) {
       construct a SolrInputDoc and then:
      QueryResponse qr = cloudClient.query(new SolrQuery("str_s:a"));
      if (qr.getResults().getNumFound() != numDocs) {
        fail("Expected "+numDocs+" to be found in the "+collectionName+
            " collection but only found "+qr.getResults().getNumFound());

      If I put the above (not the commit, just the query and the test) in a
      loop and check the query 10 times with a 1 second sleep if the numDocs
      != getNumFound(). Quite regularly I'll see a message in the log file
      that getNumFound() != numDocs, but after a few loops getNumFound() ==
      numDocs and the test succeeds.

      cloudClient is what you'd expect:
      cloudClient = getCloudSolrClient(executor.solrCloudCluster.getZkServer().getZkAddress());

      So unless I'm hallucinating, any tests that rely on
      cloudClient.commit() insuring that all docs sent to the cluster are
      searchable will potentially fail on occasion.

      I looked over the JIRAs briefly and don't see any mentions, of a
      similar problem, but I may have missed it.

      The logging I'm writing from the update handler seems to show it to be doing the right thing. Just late.

      I'll attach some data along with a "patch" which generates the logging information. I also attempted to submit a single batch rather than 10 individual docs and that fails too.


        1. 1_1.res
          3 kB
          Erick Erickson
        2. 1_2.res
          3 kB
          Erick Erickson
        3. 2_1.res
          3 kB
          Erick Erickson
        4. 2_2.res
          3 kB
          Erick Erickson
        5. debug.patch
          9 kB
          Erick Erickson
        6. runcli_12.log
          277 kB
          Erick Erickson

        Issue Links



            • Assignee:
              erickerickson Erick Erickson
              erickerickson Erick Erickson


              • Created:

                Issue deployment