ARTEMIS-2483 Sync calculation should use the block size

This commit is contained in:
Clebert Suconic 2019-09-10 16:15:55 -04:00
parent 485043cf0b
commit a2dd5ae590
1 changed files with 4 additions and 1 deletions

View File

@ -77,7 +77,10 @@ public class SyncCalculation {
int maxAIO,
JournalType journalType) throws Exception {
SequentialFileFactory factory = newFactory(datafolder, fsync, journalType, blockSize * blocks, maxAIO);
final boolean asyncWrites = journalType == JournalType.ASYNCIO && !syncWrites;
if (factory instanceof AIOSequentialFileFactory) {
factory.setAlignment(blockSize);
}
//the write latencies could be taken only when writes are effectively synchronous
if (journalType == JournalType.ASYNCIO && syncWrites) {