if (maxView > -1) {
Logging.logMessage(Logging.LEVEL_DEBUG, this, "loading database " + this.databaseName
+ " from latest snapshot:" + databaseDir + File.separator + "IX" + index + "V"
+ maxView + "SEQ" + maxSeq);
assert (comparators[index] != null);
trees.set(index, new LSMTree(databaseDir + File.separator
+ getSnapshotFilename(index, maxView, maxSeq), comparators[index], this.compression,
this.maxEntriesPerBlock, this.maxBlockFileSize, !this.disableMMap, this.mmapLimit));
ondiskLSN = new LSN(maxView, maxSeq);
} else {
ondiskLSN = NO_DB_LSN;
Logging.logMessage(Logging.LEVEL_DEBUG, this, "no snapshot for database "
+ this.databaseName);
assert (comparators[index] != null);
trees.set(index, new LSMTree(null, comparators[index], this.compression,
this.maxEntriesPerBlock, this.maxBlockFileSize, !this.disableMMap, this.mmapLimit));
}
} catch (IOException ex) {
Logging.logError(Logging.LEVEL_ERROR, this, ex);
throw new BabuDBException(ErrorCode.IO_ERROR, "cannot load index from disk", ex);