[ 
https://issues.apache.org/jira/browse/SOLR-11278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amrit Sarkar updated SOLR-11278:
--------------------------------
    Comment: was deleted

(was: bq. I don't get the logic for this. Doesn't {[waitForTargetToSync}} 
already wait for 120 seconds ? Adding another 7 seconds shouldn't help much no?

This is a wrong observation. It doesn't wait 120 seconds. *It issues commit 
every second for a period of 120 seconds and checks whether the docs are same 
or not*. 

Every explicit commit will make the new Searcher to open / Solr Core is 
reloaded with new Searcher. If SolrCore is closed while bootstrapping / fetch 
index is taking place, we receive: {{InterruptEDxception for Bootstrap}}. 
Solrcore is reloaded at middle of copying, reloads fails too and SolrCore 
becomes NULL.

See:
{code}
  private long waitForTargetToSync(int numDocs, CloudSolrClient 
targetSolrClient) throws SolrServerException, IOException, InterruptedException 
{
    long start = System.nanoTime();
    QueryResponse response = null;
    while (System.nanoTime() - start <= TimeUnit.NANOSECONDS.convert(120, 
TimeUnit.SECONDS)) {
      try {
        targetSolrClient.commit();
        response = targetSolrClient.query(new SolrQuery("*:*"));
        if (response.getResults().getNumFound() == numDocs) {
          break;
        }
      } catch (Exception e) {
        log.warn("Exception trying to commit on target. This is expected and 
safe to ignore.", e);
      }
      Thread.sleep(1000);
    }
    return response != null ? response.getResults().getNumFound() : 0;
  }
{code})

> CdcrBootstrapTest failing in branch_6_6
> ---------------------------------------
>
>                 Key: SOLR-11278
>                 URL: https://issues.apache.org/jira/browse/SOLR-11278
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: CDCR
>            Reporter: Amrit Sarkar
>            Assignee: Varun Thacker
>         Attachments: SOLR-11278.patch, test_results
>
>
> I ran beast for 10 rounds:
> ant beast -Dtestcase=CdcrBootstrapTest -Dtests.multiplier=2 -Dtests.slow=true 
> -Dtests.locale=vi -Dtests.timezone=Asia/Yekaterinburg -Dtests.asserts=true 
> -Dtests.file.encoding=US-ASCII -Dbeast.iters=10
> and seeing following failure:
> {code}
>   [beaster] [01:37:16.282] FAILURE  153s | 
> CdcrBootstrapTest.testBootstrapWithSourceCluster <<<
>   [beaster]    > Throwable #1: java.lang.AssertionError: Document mismatch on 
> target after sync expected:<2000> but was:<1000>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to