"IllegalArgumentException: new file overlaps existing files in range" on put
javornikolov opened this issue · comments
Yavor Nikolov commented
When I run a put( key, value ) loop over index from 0 to 25 million (the error is raised soon after 300 000) I'm often (though not always) getting following exception:
org.iq80.leveldb.impl.DbImpl$BackgroundProcessingException: java.lang.IllegalArgumentException: new file overlaps existing files in range at org.iq80.leveldb.impl.DbImpl.checkBackgroundException(DbImpl.java:386) at org.iq80.leveldb.impl.DbImpl.writeInternal(DbImpl.java:636) at org.iq80.leveldb.impl.DbImpl.put(DbImpl.java:602) at org.iq80.leveldb.impl.DbImpl.put(DbImpl.java:595) ...
Keys/values are like that (converted to bytes via getBytes( "UTF-8" ):
keys: "Key LOOOOOOOOOOOOOOOOOONG KEY " + index;
values: "This is element " + index + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZASDFASDKLFJASDFKJSDFLKSDJFLKJSDHFLKJHSDJFSDFHJASDFLKJSDF";
The error was reproduced with and without compression. Also with default (4K) and with 32K block size. And in general - I'm testing with default options (just createIfMissing is changed to true). And I'm always starting with clean folder used for database path.
The same thing with shorter key/value ( "Key " + index, "Value " + index ) worked without any errors.
Reproduced with:
- Oracle JRockit(R) (build R28.2.4-14-151097-1.6.0_33-20120618-1634-linux-x86_64, compiled mode)
- Java(TM) SE Runtime Environment (build 1.7.0_07-b10) /Linux x86-64/
- Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Dain Sundstrom commented
Fixed in trunk.