+1, albeit this is super sad to call waitForState all over the place.  IMO
it's a fundamental flaw that CloudSolrClient is not 100% reliable to
interact with a collection immediately after creating it, using the same
client instance.  IMO even another client should work as well -- don't see
it, double-check with the server just in case it's an eventually-consistent
issue.  If we used HttpClusterStateProvider instead of ZK; this pattern
would never happen since there wouldn't even be any cached state.

On Sat, Oct 12, 2024 at 2:56 AM sanjay dutt <sanjaydutt.unoffic...@gmail.com>
wrote:

> Failed for the first time in 90 days. Possible Solution: May be add
> waitForStatus in-between.
>
> CollectionsAPIDistributedZkTest#testCreateNodeSet
>
> List<String> baseUrls = List.of(jetty1.getBaseUrl().toString(),
> jetty2.getBaseUrl().toString());
>
> CollectionAdminRequest.createCollection("nodeset_collection", "conf", 2, 1)
>         .setCreateNodeSet(baseUrls.get(0) + "," + baseUrls.get(1))
>         .process(cluster.getSolrClient());
> DocCollection collectionState = getCollectionState("nodeset_collection");
> // Fails here
>
>
>
>
> On Sat, Oct 12, 2024 at 11:55 AM Apache Jenkins Server <
> jenk...@builds.apache.org> wrote:
>
> > Build:
> > https://ci-builds.apache.org/job/Solr/job/Solr-Check-main-s390x/752/
> >
> > 1 tests failed.
> > FAILED:
> >
> org.apache.solr.cloud.api.collections.CollectionsAPIDistributedZkTest.testCreateNodeSet
> >
> > Error Message:
> > org.apache.solr.common.SolrException: Could not find collection :
> > nodeset_collection
> >
> > Stack Trace:
> > org.apache.solr.common.SolrException: Could not find collection :
> > nodeset_collection
> >         at
> > __randomizedtesting.SeedInfo.seed([4889AEBDFE1B2880:132A795D979A0C08]:0)
> >         at
> >
> app//org.apache.solr.common.cloud.ClusterState.getCollection(ClusterState.java:125)
> >         at
> >
> app//org.apache.solr.cloud.SolrCloudTestCase.getCollectionState(SolrCloudTestCase.java:160)
> >         at
> >
> app//org.apache.solr.cloud.api.collections.AbstractCollectionsAPIDistributedZkTestBase.testCreateNodeSet(AbstractCollectionsAPIDistributedZkTestBase.java:378)
> >         at java.base@11.0.24
> /jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >         at java.base@11.0.24
> >
> /jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >         at java.base@11.0.24
> >
> /jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >         at java.base@11.0.24
> > /java.lang.reflect.Method.invoke(Method.java:566)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:80)
> >         at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
> >         at
> >
> app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
> >         at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> >         at
> >
> app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:80)
> >         at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
> >         at
> >
> app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
> >         at
> >
> app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
> >         at
> >
> app//org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
> >         at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
> >         at
> >
> app//com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
> >         at java.base@11.0.24/java.lang.Thread.run(Thread.java:829)
> >
> >
> >
> >
> > Build Log:
> > [...truncated 4537 lines...]
> > ERROR: The following test(s) have failed:
> >   -
> >
> org.apache.solr.cloud.api.collections.CollectionsAPIDistributedZkTest.testCreateNodeSet
> > (:solr:core)
> >     Test history:
> >
> https://ge.apache.org/scans/tests?search.rootProjectNames=solr-root&tests.container=org.apache.solr.cloud.api.collections.CollectionsAPIDistributedZkTest&tests.test=testCreateNodeSet
> >
> http://fucit.org/solr-jenkins-reports/history-trend-of-recent-failures.html#series/org.apache.solr.cloud.api.collections.CollectionsAPIDistributedZkTest.testCreateNodeSet
> >     Test output:
> >
> /home/jenkins/jenkins-home/712657a4/workspace/Solr/Solr-Check-main-s390x/solr/core/build/test-results/test/outputs/OUTPUT-org.apache.solr.cloud.api.collections.CollectionsAPIDistributedZkTest.txt
> >     Reproduce with: ./gradlew :solr:core:test --tests
> >
> "org.apache.solr.cloud.api.collections.CollectionsAPIDistributedZkTest.testCreateNodeSet"
> > -Ptests.jvms=4 -Ptests.haltonfailure=false
> > "-Ptests.jvmargs=-XX:TieredStopAtLevel=1 -XX:+UseParallelGC
> > -XX:ActiveProcessorCount=1 -XX:ReservedCodeCacheSize=120m"
> > -Ptests.seed=4889AEBDFE1B2880 -Ptests.multiplier=2
> -Ptests.badapples=false
> > -Ptests.file.encoding=UTF-8
> >
> >
> > Deprecated Gradle features were used in this build, making it
> incompatible
> > with Gradle 9.0.
> >
> > You can use '--warning-mode all' to show the individual deprecation
> > warnings and determine if they come from your own scripts or plugins.
> >
> > For more on this, please refer to
> >
> https://docs.gradle.org/8.4/userguide/command_line_interface.html#sec:command_line_warnings
> > in the Gradle documentation.
> >
> > BUILD SUCCESSFUL in 1h 34m 56s
> > 645 actionable tasks: 645 executed
> >
> > Publishing build scan...
> > https://ge.apache.org/s/kpbewupacaqke
> >
> > Build step 'Invoke Gradle script' changed build result to SUCCESS
> > Archiving artifacts
> > ‘**/*.events’ doesn’t match anything: ‘**’ exists but not ‘**/*.events’
> > No artifacts found that match the file pattern
> > "**/*.events,heapdumps/**,**/hs_err_pid*". Configuration error?
> > Recording test results
> > [Checks API] No suitable checks publisher found.
> > Build step 'Publish JUnit test result report' changed build result to
> > UNSTABLE
> > Email was triggered for: Unstable (Test Failures)
> > Sending email for trigger: Unstable (Test Failures)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: builds-unsubscr...@solr.apache.org
> > For additional commands, e-mail: builds-h...@solr.apache.org
>

Reply via email to