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:45 UTC

[activemq-artemis] branch main updated (7fc312a -> ff6e157)

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git.


    from 7fc312a  ARTEMIS-3372 - disconnect consumers on queue deletion event
     new bb3f313  ARTEMIS-3354 journal-max-io cannot be set to 1 with ASYNCIO journal
     new ff6e157  ARTEMIS-3354 Better doc journal-max-io misuse with ASYNCIO

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../activemq/artemis/core/io/aio/AIOSequentialFileFactory.java      | 6 +++++-
 .../tests/integration/journal/AIOSequentialFileFactoryTest.java     | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

[activemq-artemis] 02/02: ARTEMIS-3354 Better doc journal-max-io misuse with ASYNCIO

Posted by cl...@apache.org.
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()) {

[activemq-artemis] 01/02: ARTEMIS-3354 journal-max-io cannot be set to 1 with ASYNCIO journal

Posted by cl...@apache.org.
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 bb3f31340da15fa3e7c6f93b4eb5cb0db2badb4a
Author: franz1981 <ni...@gmail.com>
AuthorDate: Thu Jun 17 09:49:50 2021 +0200

    ARTEMIS-3354 journal-max-io cannot be set to 1 with ASYNCIO journal
---
 .../activemq/artemis/core/io/aio/AIOSequentialFileFactory.java       | 3 ++-
 .../tests/integration/journal/AIOSequentialFileFactoryTest.java      | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

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 bfa25be..94e2eb4 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,7 +112,8 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
                                    final IOCriticalErrorListener listener,
                                    final CriticalAnalyzer analyzer) {
       super(journalDir, true, bufferSize, bufferTimeout, maxIO, logRates, listener, analyzer);
-      callbackPool = PlatformDependent.hasUnsafe() ? new MpmcArrayQueue<>(maxIO) : new MpmcAtomicArrayQueue<>(maxIO);
+      final int adjustedMaxIO = Math.max(2, maxIO);
+      callbackPool = PlatformDependent.hasUnsafe() ? new MpmcArrayQueue<>(adjustedMaxIO) : new MpmcAtomicArrayQueue<>(adjustedMaxIO);
       if (logger.isTraceEnabled()) {
          logger.trace("New AIO File Created");
       }
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
index 4e7f315..2193f7f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/AIOSequentialFileFactoryTest.java
@@ -40,6 +40,11 @@ public class AIOSequentialFileFactoryTest extends SequentialFileFactoryTestBase
    }
 
    @Test
+   public void canCreateFactoryWithMaxIOLessThenTwo() {
+      AIOSequentialFileFactory factory = new AIOSequentialFileFactory(new File("ignore"), 1);
+   }
+
+   @Test
    public void testBuffer() throws Exception {
       SequentialFile file = factory.createSequentialFile("filtetmp.log");
       file.open();