Skip to content

Instantly share code, notes, and snippets.

@gtully
gtully / gist:98acc4a3db5cd11beb331c547359ff04
Created March 1, 2018 17:08
unit test that shows consumers prefetching past the page size
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/amq/common/pom.xml b/amq/common/pom.xml
index de77d93..fc980ee 100644
--- a/amq/common/pom.xml
+++ b/amq/common/pom.xml
@@ -39,12 +39,18 @@
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
@gtully
gtully / MessagePropertiesConcurrencyTest.java
Created November 8, 2019 13:37
see to produce a data race
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
index e4a19a3b48..63960125dd 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
@@ -1712,7 +1712,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
*/
Set<Integer> checkpointUpdate(Transaction tx, boolean cleanup) throws IOException {
MDC.put("activemq.persistenceDir", getDirectory().getName());
- LOG.debug("Checkpoint started.");
+ LOG.debug("Checkpoint started. cleanup:" + cleanup);
@gtully
gtully / PluggableQuorumReplicationTest
Created July 30, 2021 11:42
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/PluggableQuorumReplicationTest.java
@Test
public void testUnavailableSelfHeal() throws Exception {
// start backup
Configuration backupConfiguration = createBackupConfiguration();
ActiveMQServer backupServer = addServer(ActiveMQServers.newActiveMQServer(backupConfiguration));
backupServer.setIdentity("BACKUP");
backupServer.start();
[Thread-0 (activemq-client-remoting)] 15:18:29,875 INFO [org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler] Outbound connection failed - unknown mechanism, offered mechanisms: [PLAIN, ANONYMOUS]
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 884
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 884
[Thread-0 (activemq-client-remoting)] 15:18:29,879 WARN [io.netty.channel.DefaultChannelPipeline] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.StackOverflowError
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at java.base/java