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 2021/07/07 16:17:47 UTC
[activemq-artemis] 02/02: ARTEMIS-3354 Better doc journal-max-io
misuse with ASYNCIO
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit ff6e1572c40abaf2470b5748466e7a679ea2cf74
Author: franz1981 <ni...@gmail.com>
AuthorDate: Thu Jun 17 13:22:30 2021 +0200
ARTEMIS-3354 Better doc journal-max-io misuse with ASYNCIO
---
.../apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java
index 94e2eb4..0050b16 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java
@@ -112,6 +112,9 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
final IOCriticalErrorListener listener,
final CriticalAnalyzer analyzer) {
super(journalDir, true, bufferSize, bufferTimeout, maxIO, logRates, listener, analyzer);
+ if (maxIO == 1) {
+ ActiveMQJournalLogger.LOGGER.warn("Using journal-max-io 1 isn't a proper use of ASYNCIO journal: consider rise this value or use NIO.");
+ }
final int adjustedMaxIO = Math.max(2, maxIO);
callbackPool = PlatformDependent.hasUnsafe() ? new MpmcArrayQueue<>(adjustedMaxIO) : new MpmcAtomicArrayQueue<>(adjustedMaxIO);
if (logger.isTraceEnabled()) {