Reverted change

This commit is contained in:
nathan 2017-08-01 00:15:31 +02:00
parent 0c5d5e2ef8
commit e7a8fefd60

View File

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