Reverted change

This commit is contained in:
nathan 2017-08-01 00:15:31 +02:00
parent 0c5d5e2ef8
commit e7a8fefd60
1 changed files with 2 additions and 3 deletions

View File

@ -187,9 +187,8 @@ class StorageBase {
this.memoryIndex.put(meta.key, meta);
}
// offset by one, because numberOfRecords counts from 1, and memoryIndex.size() is from 0
if (this.memoryIndex.size() + 1 != (this.numberOfRecords)) {
setRecordCount(this.randomAccessFile, this.memoryIndex.size() + 1);
if (this.memoryIndex.size() != (this.numberOfRecords)) {
setRecordCount(this.randomAccessFile, this.memoryIndex.size());
if (logger != null) {
logger.warn("Mismatch record count in storage, auto-correcting size.");
}