You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Chris M. Hostetter (Jira)" <ji...@apache.org> on 2025/03/25 00:40:00 UTC
[jira] [Commented] (SOLR-17719) TestManagedSchemaWithMultipleAdd timing related failures (should use a semaphore hook to wait for newSearcher)
[ https://issues.apache.org/jira/browse/SOLR-17719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17938069#comment-17938069 ]
Chris M. Hostetter commented on SOLR-17719:
-------------------------------------------
Suggested improvement:
* Modify the configset usedby the test to use {{RecordingUpdateProcessorFactory}}
** start recording before adding the docs
* rip out the {{Thread.sleep}}
** replace it with code that uses {{JettySolrRunner.getCoreContainer}} to reach into the leader replica to get the {{RecordingUpdateProcessorFactory}} instance for this core, and poll on it's (public) queue until it sees the commit
** See {{DocExpirationUpdateProcessorFactoryTest}} for an example of the polling
> TestManagedSchemaWithMultipleAdd timing related failures (should use a semaphore hook to wait for newSearcher)
> --------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-17719
> URL: https://issues.apache.org/jira/browse/SOLR-17719
> Project: Solr
> Issue Type: New Feature
> Reporter: Chris M. Hostetter
> Priority: Major
> Labels: newdev
>
> TestManagedSchemaWithMultipleAdd can fail sporadically – frequently on MacOS.
> The basic logic of the test is to:
> * add a field
> * immediately add some documents using that field
> * wait for autocommit and confirm we can search for those documents
> The problematic bit is the "wait for autocommit" – the test has the following bit of code...
> {noformat}
> // The issue we test in this class does not appear when using explicit commits.
> // Because of this we are waiting for autoSoftCommit to finish if there is one.
> Thread.sleep(AUTOSOFTCOMMIT_MAXTIME_MS + 500); assertEquals(
> numDocs, cloudClient.query(collection, new SolrQuery("*:*")).getResults().getNumFound());
> {noformat}
> ...but that assertion can fail anytime the autocommit timer sleep runs a little slower then the test sleep.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org