You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/09/11 00:10:28 UTC
[activemq-artemis] branch master updated: ARTEMIS-2483 Sync
calculation should use the block size
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new a2dd5ae ARTEMIS-2483 Sync calculation should use the block size
new a8d68d9 This closes #2833
a2dd5ae is described below
commit a2dd5ae5907bf3c95b851edc4c1f776e203fc3b8
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Sep 10 16:15:55 2019 -0400
ARTEMIS-2483 Sync calculation should use the block size
---
.../apache/activemq/artemis/cli/commands/util/SyncCalculation.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
index 443c851..3842922 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
@@ -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) {