mirror of https://github.com/apache/lucene.git
LUCENE-9189: TestIndexWriterDelete.testDeletesOnDiskFull can run for minutes
The issue is that MockDirectoryWrapper's disk full check is horribly inefficient. On every writeByte/etc, it totally recomputes disk space across all files. This means it calls listAll() on the underlying Directory (which sorts all the underlying files), then sums up fileLength() for each of those files. This leads to many pathological cases in the disk full tests... but the number of tests impacted by this is minimal, and the logic is scary.
This commit is contained in:
parent
3bcc97c8eb
commit
4773574578
|
@ -482,11 +482,13 @@ public class TestIndexWriterDelete extends LuceneTestCase {
|
|||
return hitCount;
|
||||
}
|
||||
|
||||
// TODO: can we fix MockDirectoryWrapper disk full checking to be more efficient (not recompute on every write)?
|
||||
@Nightly
|
||||
public void testDeletesOnDiskFull() throws IOException {
|
||||
doTestOperationsOnDiskFull(false);
|
||||
}
|
||||
|
||||
// TODO: can we tone this test down so it isn't crazy slow?
|
||||
// TODO: can we fix MockDirectoryWrapper disk full checking to be more efficient (not recompute on every write)?
|
||||
@Nightly
|
||||
public void testUpdatesOnDiskFull() throws IOException {
|
||||
doTestOperationsOnDiskFull(true);
|
||||
|
|
Loading…
Reference in New Issue