371 Commits

Author SHA1 Message Date
Justin Bertram
9eba887142 ARTEMIS-5298 refactor RandomUtil
There is lots of duplicated code across the code-base creating random
String objects of various lengths. These can be eliminated by
implementing a simple utility method in RandomUtil. Also, other methods
in RandomUtil can be renamed to be more clear.
2025-02-12 15:54:11 +00:00
Justin Bertram
009f909b41 ARTEMIS-5299 prefer StringBuilder over StringBuffer
StringBuffer is equivalent to StringBuffer but without thread safety
which isn't needed in most cases.
2025-02-12 15:54:11 +00:00
Justin Bertram
d587a077f6 ARTEMIS-5295 use switch expressions where possible 2025-02-12 15:54:11 +00:00
Justin Bertram
3d7970d717 ARTEMIS-5294 use String.repeat() where possible 2025-02-12 15:54:11 +00:00
Justin Bertram
54f93c7e77 ARTEMIS-5291 simplify assertions 2025-02-05 17:15:55 +00:00
Justin Bertram
0aa9c2d6ea ARTEMIS-5271 eliminate unused variables 2025-01-30 17:37:25 +00:00
Justin Bertram
134f1a90fe ARTEMIS-5276 use text blocks where possible 2025-01-30 17:37:25 +00:00
Justin Bertram
fecbd73e12 ARTEMIS-5273 use collection interfaces where possible 2025-01-30 17:37:25 +00:00
Justin Bertram
a40b0a5735 ARTEMIS-5272 eliminate unused private fields 2025-01-30 17:37:25 +00:00
Justin Bertram
d49476d0a1 [maven-release-plugin] prepare for next development iteration 2024-12-16 09:25:19 -06:00
Justin Bertram
fb1c6e3217 [maven-release-plugin] prepare release 2.39.0 2024-12-16 09:19:43 -06:00
Justin Bertram
e6f97f6e5c
Revert "[maven-release-plugin] prepare release 2.39.0"
This reverts commit 0604de39d6cc1f2946368d5775a9ef4ff753cbbf.
2024-12-16 08:55:55 -06:00
Justin Bertram
6b6ae242ed
Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit 918ef0efbe62ed5c64a0c2f8adc8f0cc3aba35d2.
2024-12-16 08:55:38 -06:00
Justin Bertram
918ef0efbe [maven-release-plugin] prepare for next development iteration 2024-12-13 08:10:30 -06:00
Justin Bertram
0604de39d6 [maven-release-plugin] prepare release 2.39.0 2024-12-13 08:05:42 -06:00
Justin Bertram
a2357b9d6d ARTEMIS-5210 bump com.google.errorprone:error_prone_core from 2.31.0 to 2.36.0 2024-12-12 12:20:26 -05:00
Clebert Suconic
2a067e08ee ARTEMIS-5173 Improving reliability on test 2024-12-11 10:54:43 -05:00
Clebert Suconic
8422c77c7d ARTEMIS-4173 Improving reliability on RandomReattachTest
- making the test to run faster and removing the soak and stress versions as they are not really needed
- allowing expected exceptions (cannot find ACK, and making it retry the operation)
- removing duplicates of the test that are not really needed.
2024-12-06 08:38:53 -06:00
Clebert Suconic
f260c40e78 ARTEMIS-5173 Improve reliability of ReplicaTXCheckTest 2024-11-21 15:24:09 -05:00
Clebert Suconic
8afa3d8a41 ARTEMIS-5156 Wait.assertEquals on messageCount 2024-11-19 12:31:06 -05:00
Clebert Suconic
215cc5752f ARTEMIS-5156 Making LargeMessageFrozenTest more reliable 2024-11-18 13:48:06 -05:00
Clebert Suconic
f3341a5337 ARTEMIS-5159 lowering number of threads on SoakReplicatedPagingTest 2024-11-18 13:46:52 -05:00
Robbie Gemmell
8d02f8dc77 ARTEMIS-5148: fix checkstyle issue with 447b72ae5b03016a0986161d85426e498e815c1c 2024-11-14 09:05:05 +00:00
Clebert Suconic
447b72ae5b ARTEMIS-5148 Simplifying and making ClusteredLargeMessageInterruptTest more reliable 2024-11-13 12:49:24 -05:00
Clebert Suconic
02e0b14dfd ARTEMIS-5118 Expose HelperCreate on the CLI Jar 2024-10-22 12:37:52 -04:00
Justin Bertram
9380235a5e [maven-release-plugin] prepare for next development iteration 2024-10-16 10:10:37 -05:00
Justin Bertram
241e76f9da [maven-release-plugin] prepare release 2.38.0 2024-10-16 10:08:10 -05:00
Clebert Suconic
30c5e63e0b ARTEMIS-5066 Disable Divert on Mirror Target 2024-09-25 21:57:45 -04:00
Clebert Suconic
f92a846c21 ARTEMIS-5038 Mirrored ACKs are broken if using multiple priorities on producers
PriorityLinkedList has multiple sub-lists, before this commit PriorityLinkedList::setNodeStore would set the same node store between all the lists.
When a removeWithID was called for an item on list[0] the remove from list[4] would always succeed first. This operation would work correctly most of the time except
when tail and head is being used. Many NullPointerExceptions would be seen while iterating on the list for remove operations, and the navigation would be completely broken.

A test was added to PriorityLinkedListTest to make sure the correct lists were used however I was not able to reproduce the NPE condition in that test.
AccumulatedInPageSoakTest reproduced the exact condition for the NPE when significant load is used.
2024-09-23 11:48:24 -04:00
Clebert Suconic
7860fd5fa9 ARTEMIS-5035 M_and_M_FactoryTest cannot use OpenWire as it's using JMS2 2024-09-18 11:33:05 -04:00
Clebert Suconic
e322a418ce ARTEMIS-5010 Adding Failback scenario to ReplicatedBothNodesMirrorTest 2024-09-09 15:50:48 -04:00
Clebert Suconic
daba842984 ARTEMIS-5035 Change some tests to use a random choice for protocol 2024-09-05 17:04:48 -04:00
Clebert Suconic
7fb9aa5f97 ARTEMIS-5010 Addressing deadlock on AckManager
AckManager.flush would hold a lock on ackManager, There was a possible deadlock with MirrorTarget:

Thread 1:

        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.addRetry(AckManager.java:393)
        - waiting to lock <0x00000007990a13e8> (a org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.ack(AckManager.java:418)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.performAck(AMQPMirrorControllerTarget.java:479)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.postAcknowledge(AMQPMirrorControllerTarget.java:461)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.actualDelivery(AMQPMirrorControllerTarget.java:318)
        at org.apache.activemq.artemis.protocol.amqp.proton.ProtonAbstractReceiver.onMessageComplete(ProtonAbstractReceiver.java:361)

Thread 2:

        at jdk.internal.misc.Unsafe.park(java.base@11.0.8/Native Method)
        - parking to wait for  <0x000000079de0af38> (a java.util.concurrent.CountDownLatch$Sync)
        at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.8/LockSupport.java:234)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(java.base@11.0.8/AbstractQueuedSynchronizer.java:1079)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(java.base@11.0.8/AbstractQueuedSynchronizer.java:1369)
        at java.util.concurrent.CountDownLatch.await(java.base@11.0.8/CountDownLatch.java:278)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.flush(AMQPMirrorControllerTarget.java:230)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager$$Lambda$601/0x00000008005c3040.accept(Unknown Source)
        at java.lang.Iterable.forEach(java.base@11.0.8/Iterable.java:75)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.flushMirrorTargets(AckManager.java:184)
        - locked <0x00000007990a13e8> (a org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.initRetry(AckManager.java:162)
2024-09-04 16:19:52 -04:00
Clebert Suconic
4352ebae5f ARTEMIS-5010 Addressing comments from PR https://github.com/apache/activemq-artemis/pull/5186 2024-08-28 14:08:49 -04:00
Clebert Suconic
4ba9f67d80 ARTEMIS-5010 AckManager records are not replicated 2024-08-28 11:53:16 -04:00
Clebert Suconic
38693370c9 Revert "ARTEMIS-5001 Option to relax sync on journal replication for Mirroring"
This reverts commit d41f01a5aa3722002fc8199eda34198753cc23f2.
2024-08-26 12:49:42 -04:00
Clebert Suconic
ac666f3ab1 NO-JIRA Fixing typo on porOffset -> portOffset 2024-08-20 16:03:57 -04:00
Clebert Suconic
d41f01a5aa ARTEMIS-5001 Option to relax sync on journal replication for Mirroring
Say you use Mirroring and journal replication combined.

The target will wait a round trip on replica before sends are done.
It is possible to ignore that rountrip now with an option added into Configuration#mirrorReplicaSync
2024-08-20 16:03:57 -04:00
Clebert Suconic
c042fb9e13 [maven-release-plugin] prepare for next development iteration 2024-08-16 10:23:18 -04:00
Clebert Suconic
0ec68a93d3 [maven-release-plugin] prepare release 2.37.0 2024-08-16 10:23:17 -04:00
Clebert Suconic
209f293922 [maven-release-plugin] prepare for next development iteration 2024-08-14 14:39:34 -04:00
Clebert Suconic
de6efc82d1 [maven-release-plugin] prepare release 2.37.0 2024-08-14 14:39:21 -04:00
Clebert Suconic
47acdc4517 ARTEMIS-4964 Fast ACK Test with Mirror
One side of the mirror will send and ack messages one by one.

As the message arrives in the mirror the ack comes before the persistence finishes, so we need to retry and configure retry accordingly.
2024-08-01 23:09:54 -04:00
Clebert Suconic
fa917ae3fd [maven-release-plugin] prepare for next development iteration 2024-07-25 13:47:10 -04:00
Clebert Suconic
75f17ba64d [maven-release-plugin] prepare release 2.36.0 2024-07-25 13:47:09 -04:00
Clebert Suconic
ca44ad2a33 ARTEMIS-3509 Improving assertions in StompTest 2024-07-24 12:13:07 -04:00
Clebert Suconic
e50c73eac9 Revert "ARTEMIS-3509 Improving assertions on StompTest"
Sorry for the spam, I pushed this commit by mistake / accident

This reverts commit db0a0975bbe2e993342048dbfce7c52617249886.
2024-07-24 10:42:19 -04:00
Clebert Suconic
db0a0975bb ARTEMIS-3509 Improving assertions on StompTest 2024-07-24 09:59:43 -04:00
Clebert Suconic
da7dccae87 ARTEMIS-4925 Making assertion to also consider journal and other files from the broker
Small change but say there's ever a leak on the journal. Removing the clause from paging would allow to also capture other leaks.

This is currently not an issue and the test should still pass.
2024-07-18 14:16:02 -04:00
Clebert Suconic
58f9e00874 ARTEMIS-4925 adding missing assertion on the test 2024-07-17 12:02:41 -04:00