1
0
mirror of https://github.com/apache/activemq-artemis.git synced 2025-03-05 08:50:13 +00:00

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

@ -77,7 +77,10 @@ public class SyncCalculation {
int maxAIO, int maxAIO,
JournalType journalType) throws Exception { JournalType journalType) throws Exception {
SequentialFileFactory factory = newFactory(datafolder, fsync, journalType, blockSize * blocks, maxAIO); 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 //the write latencies could be taken only when writes are effectively synchronous
if (journalType == JournalType.ASYNCIO && syncWrites) { if (journalType == JournalType.ASYNCIO && syncWrites) {