[ https://issues.apache.org/jira/browse/SOLR-14784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17186909#comment-17186909 ]
Adrien Grand commented on SOLR-14784: ------------------------------------- This seed does indeed fail for me but I'm not seeing the above error in the logs, did you have to do something special to get this error? The bug I'm seeing is due to the fact that the test assumes that a fully written segment has more files than a pending writing segment, but this is not the case with the recent change you mentioned since stored fields write 4 files on the fly (fdm (meta), fdt (data) and two temporary files for the stored fileds index), while a compound segment only needs 3 files (cfs, cfe, si). I'm unsure what the test tries to verify, I hacked it to count segments instead, which makes the test pass. {code} diff --git a/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java b/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java index b3d3a5c916e..a4f31d126d8 100644 --- a/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java +++ b/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java @@ -392,7 +392,9 @@ public class DirectUpdateHandlerTest extends SolrTestCaseJ4 { } assertU(adoc("id", "1")); - int nFiles = d.listAll().length; + // Ignore temporary files + long numSegments = Arrays.stream(d.listAll()).filter(s -> s.endsWith(".si")).count(); + assertTrue("SegmentInfoFormat is not using 'si' as an extension?", numSegments > 0); if (log.isInfoEnabled()) { log.info("FILES before prepareCommit={}", Arrays.asList(d.listAll())); } @@ -402,7 +404,8 @@ public class DirectUpdateHandlerTest extends SolrTestCaseJ4 { if (log.isInfoEnabled()) { log.info("FILES after prepareCommit={}", Arrays.asList(d.listAll())); } - assertTrue( d.listAll().length > nFiles); // make sure new index files were actually written + long newNumSegments = Arrays.stream(d.listAll()).filter(s -> s.endsWith(".si")).count(); + assertTrue( newNumSegments > numSegments); // make sure a new segment was written assertJQ(req("q", "id:1") , "/response/numFound==0" {code} > Reproducible failure for DirectUpdateHandlerTest > ------------------------------------------------ > > Key: SOLR-14784 > URL: https://issues.apache.org/jira/browse/SOLR-14784 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: Tests > Affects Versions: master (9.0) > Reporter: Erick Erickson > Priority: Major > Attachments: DirectUpdateHandlerTest-fail.txt, > DirectUpdateHandlerTest-success.xml > > > This is rather weird. It apparently was introduced by LUCENE-9456, but that > seems odd. Although I do note that that push may do some different error > handling, perhaps Solr needs to accommodate that. > Of course it doesn't necessarily reproduce with other seeds. > [~jpountz] do you have any hints? > Reproduce 100% with: > ./gradlew :solr:core:test --tests > "org.apache.solr.update.DirectUpdateHandlerTest" > -Ptests.seed=2BE3A8682E5E346D -Ptests.multiplier=2 -Ptests.badapples=false > -Ptests.file.encoding=US-ASCII > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org