Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions artemis-features/src/main/resources/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<bundle dependency="true">mvn:org.apache.commons/commons-text/${commons.text.version}</bundle>
<bundle dependency="true">mvn:org.apache.commons/commons-lang3/${commons.lang.version}</bundle>
<bundle dependency="true">mvn:org.jctools/jctools-core/${jctools.version}</bundle>
<bundle dependency="true">mvn:org.jctools/jctools-core-jdk11/${jctools.version}</bundle>
<bundle dependency="true">mvn:org.hdrhistogram/HdrHistogram/${hdrhistogram.version}</bundle>
<bundle dependency="true">mvn:com.github.ben-manes.caffeine/caffeine/${caffeine.version}</bundle>
<bundle dependency="true">mvn:org.apache.commons/commons-dbcp2/${commons.dbcp2.version}</bundle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.apache.activemq.artemis.core.journal.impl.SimpleWaitIOCallback;
import org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent;
import org.apache.activemq.artemis.utils.ReusableLatch;
import org.jctools.queues.MpscUnboundedArrayQueue;
import org.jctools.queues.varhandle.MpscUnboundedVarHandleArrayQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -75,7 +75,7 @@ public class JDBCSequentialFile implements SequentialFile {

private final JDBCSequentialFileFactoryDriver dbDriver;

MpscUnboundedArrayQueue<ScheduledWrite> writeQueue = new MpscUnboundedArrayQueue<>(8192);
MpscUnboundedVarHandleArrayQueue<ScheduledWrite> writeQueue = new MpscUnboundedVarHandleArrayQueue<>(8192);

// Allows DB Drivers to cache meta data.
private final Map<Object, Object> metaData = new ConcurrentHashMap<>();
Expand Down
2 changes: 1 addition & 1 deletion artemis-journal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</dependency>
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<artifactId>jctools-core-jdk11</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
import org.jctools.queues.MpmcArrayQueue;
import org.jctools.queues.varhandle.MpmcVarHandleArrayQueue;
import org.jctools.queues.atomic.MpmcAtomicArrayQueue;

public final class AIOSequentialFileFactory extends AbstractSequentialFileFactory {
Expand Down Expand Up @@ -115,7 +115,7 @@ public AIOSequentialFileFactory(final File journalDir,
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);
callbackPool = PlatformDependent.hasUnsafe() ? new MpmcVarHandleArrayQueue<>(adjustedMaxIO) : new MpmcAtomicArrayQueue<>(adjustedMaxIO);
logger.trace("New AIO File Created");
}

Expand Down
2 changes: 1 addition & 1 deletion artemis-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@
<!--needed to compile transport jar-->
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<artifactId>jctools-core-jdk11</artifactId>
<version>${jctools.version}</version>
<!-- License: Apache 2.0 -->
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion artemis-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
</dependency>
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<artifactId>jctools-core-jdk11</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
import org.apache.activemq.artemis.utils.collections.PriorityLinkedListImpl;
import org.apache.activemq.artemis.utils.collections.TypedProperties;
import org.apache.activemq.artemis.utils.critical.CriticalComponentImpl;
import org.jctools.queues.MpscUnboundedArrayQueue;
import org.jctools.queues.varhandle.MpscUnboundedVarHandleArrayQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -201,7 +201,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {

// Messages will first enter intermediateMessageReferences before they are added to messageReferences. This is to
// avoid locking the queue on the producer
private final MpscUnboundedArrayQueue<MessageReference> intermediateMessageReferences;
private final MpscUnboundedVarHandleArrayQueue<MessageReference> intermediateMessageReferences;

// This is where messages are stored
protected final PriorityLinkedList<MessageReference> messageReferences = new PriorityLinkedListImpl<>(QueueImpl.NUM_PRIORITIES, MessageReferenceImpl.getSequenceComparator());
Expand Down Expand Up @@ -456,7 +456,7 @@ public void onChange() {
this.initialQueueBufferSize = this.cachedAddressSettings.getInitialQueueBufferSize() == null
? ActiveMQDefaultConfiguration.INITIAL_QUEUE_BUFFER_SIZE
: this.cachedAddressSettings.getInitialQueueBufferSize();
this.intermediateMessageReferences = new MpscUnboundedArrayQueue<>(initialQueueBufferSize);
this.intermediateMessageReferences = new MpscUnboundedVarHandleArrayQueue<>(initialQueueBufferSize);

verifyDisabledConfiguration();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/db-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
</dependency>
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<artifactId>jctools-core-jdk11</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</dependency>
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<artifactId>jctools-core-jdk11</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Loading