jpountz commented on issue #14255: URL: https://github.com/apache/lucene/issues/14255#issuecomment-2666999215
I looked into the failure: the test randomly configures `targetSearchConcurrency=27`. Since the index allows `ceil(numDocs/targetSearchConcurrency)` docs per segment at most, at long as there are less than 27*3=81 docs, only 2 docs are allowed per segment, so no merges occur. But when the index suddenly reaches 81 docs, merging is allowed, and 8 merges of 2 segments each are returned. These merges reduce the segment count by 8, which is more than segsPerTier=6, so the assertion that the number of segments may not decrease by more than `segsPerTier` fails. I am leaning towards removing the `count >= maxCount - 6` assertion. This test cares about the forceMerge behavior, which it only starts testing when the initial indexing finishes. On the other hand, this assertion runs during the initial indexing. I suspect that it was added as a sanity check, based on old assumptions of how `TieredMergePolicy` worked a long time ago. But TieredMergePolicy has become more sophisticated with the introduction `targetSearchConcurrency`, the removal of `maxMergeAtOnce` and other changes, and I don't think that this test should enforce that the number of segments may not decrease by more than `segsPerTier` between two document insertions. What do you think @benwtrent ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org