Commit Graph

102 Commits

Author SHA1 Message Date
Pat Fox b39c556784 NO-JIRA fixed minor regression(reverted JSON field names) and NullPointer in ActiveMQServerControlImpl 2017-12-12 13:17:02 +00:00
Pat Fox 7d61969795 ARTEMIS-1526 race condition between listConsumers() and closing a Session. When session not found, ignore that consumer and continue. 2017-12-05 09:10:40 -06:00
Clebert Suconic ce9e824297 ARTEMIS-1531 Fixing checkstyle on byteman test 2017-11-29 20:53:59 -05:00
Clebert Suconic f9d101d0a1 ARTEMIS-1531 Adding timedbuffer operations on critical analyzer
Also, making TimedBuffer.stop() synchronized to avoid issues during device outages
2017-11-29 18:09:00 -05:00
Pat Fox 4edf6793bb ARTEMIS-1524 avoid null pointer due to race condition in listAddresses(). If address is deleted, ignore that address and continue 2017-11-27 13:05:12 -05:00
Martyn Taylor 2e7b660ca8 ARTEMIS-1489 CriticalAnalyzer Fault Injection Test
Fault injection via Byteman to simulate deadlock and slow disk
sync scenarios, ensures the Critical Analyzer detects the issues
reacts appropriately.
2017-11-15 13:37:29 -05:00
Clebert Suconic 75dc271cdb NO-JIRA Small refactoring on Wait
- Added Wait.assert methods, what would make it easier to assert on future conditions
- Moved Wait to artemis-junit, we are now using that module on the testsuite
2017-11-02 09:37:31 -04:00
Clebert Suconic f8a0eec2cf ARTEMIS-1489 Adjusting timeouts on test
The Critical analyzer is supposed to catch Deadlocks, and such
can only be resolved by killing the VM.

This test is using shutdown as it would be a bit more complex to
handle Byteman to then halt the VM. This will validate the
CriticalAnalyzer is capturing the event, and in such it would halt the VM.
2017-10-31 08:33:44 -05:00
Martyn Taylor 5a476a189d ARTEMIS-1489 Add test for TimedBuffer Critical Analyser 2017-10-31 08:33:44 -05:00
Howard Gao 613b459c52 ARTEMIS-1315 Client disconnection may cause consumer to hang
When calling a consumer to receive message with a timeout
(receive(long timeout), if the consumer's buffer is empty, it sends
a 'forced delivery' the waiting forever, expecting the server to
send back a 'forced delivery" message if the queue is empty.

If the connection is disconnected as the arrived 'forced
delivery' message is corrupted, this 'forced delivery' message
never gets to consumer. After the session is reconnected,
the consumer never knows that and stays waiting.

To fix that we can send a 'forced delivery' to server right
after the session is reconnected.
2017-08-02 12:48:43 -04:00
xstefank 553043393e ARTEMIS-1257 ActiveMQActivationSpec.java should use boxed types for attributes values according to the JCA specification 2017-07-24 09:41:25 -04:00
Francesco Nigro 7075e2e457 ARTEMIS-1266 Mapped Journal refactoring
The MAPPED journal refactoring include:
 - simplified lifecycle and logic (eg fixed file size with single mmap memory region)
 - supports for the TimedBuffer to coalesce msyncs (via Decorator pattern)
 - TLAB pooling of direct ByteBuffer like the NIO journal
 - remove of old benchmarks and benchmark dependencies
2017-06-30 16:17:19 +02:00
Clebert Suconic 5c2144b782 ARTEMIS-1256 PagingOMETest.testPageCleanup fails
Using a Wait condition.

This closes #1370
2017-06-27 12:48:35 -04:00
Clebert Suconic 36110da9c8 ARTEMIS-1253 Refactoring renaming stop(boolean) to fail(boolean)
This method name would clash with ServiceComponent
As the real meaning here on this method is just to failover
So I've renamed the method to avoid the clash with my next commit

(I've done this on a separate commit as you may need to redo this
 commit from scratch again in other branches instead of lots of clashes on cherry-pick)
2017-06-26 16:15:39 -04:00
Howard Gao 045021f7df ARTEMIS-1220 Diverted LargeMessage file corrupted during replication
When a large message is being diverted, a new copy of the original
message is created and replicated (if there is a backup) to the backup.

In LargeServerMessageImpl.copy(long) it reuse a byte array to copy
message body. It is possible that one block of date is read into
the byte array before the previous read has been replicated,
causing the replicated bytes to corrupt.

If we make a copy of the byte array before replication, the corruption
of data will be avoided.
2017-06-26 14:31:43 -04:00
Clebert Suconic 85aeac99ab Revert "ARTEMIS-1227 Internal properties not removed from messages"
This reverts commit f465996444.

Following discussion on https://github.com/hornetq/hornetq/pull/2114
2017-06-22 09:49:45 -04:00
Howard Gao 3d0896f87c ARTEMIS-1240 Disconnect at client side on decoding error
When a broken packet arrives at client side it causes decoding error.
Currently artemis doesn't handle it properly. It should catch such
errors and disconnect the underlying connection, logging a proper
warning message
2017-06-21 10:25:34 -04:00
Jiri Danek 9ad8b71273 ARTEMIS-1212 add a jms.queue. workaround to HornetQProtocolManagerTest 2017-06-14 11:35:50 -05:00
Howard Gao f465996444 ARTEMIS-1227 Internal properties not removed from messages
In a cluster if a node is shut down (or crashed) when a
message is being routed to a remote binding, a internal
property may be added to the message and persisted. The
name of the property is like _AMQ_ROUTE_TOsf.my-cluster*.
if the node starts back, it will load and reroute this message
and if it goes to a local consumer, this property won't
get removed and goes to the client.

The fix is to remove this internal property before it
is sent to any client.
2017-06-12 13:01:12 -05:00
Erich Duda 30e8ca656c ARTEMIS-1208 Do not use reconnect-atempts=-1 in tests 2017-06-08 17:38:11 -04:00
Michael Andre Pearce c65ea783ea ARTEMIS-1189 - Fix checkstyle violations post checkstyle upgrade
After upgrade of checkstyle, resolve violations

remove checkstyle override added as temp measure at point of upgrade forced by sevntu
2017-05-30 13:40:00 -04:00
Howard Gao 82c720bdfb ARTEMIS-1071 Invalid Type exception handling improvements
If broker fails to decode any packets from buffer, it should
treat it as a critical bug and disconnect immediately.
Currently broker only logs an error message.
2017-03-29 09:19:52 -04:00
Howard Gao 6e02caa53e ARTEMIS-1024 Management operation causes ClassNotFoundException
Artemis expose createQueue() method to management console like Jon.
If the queue to be created already exists it throws an ActiveMQException
back to the console, which will get a ClassNotFoundException when
deserializing the exception.
The same issue goes also with AddressControl.sendMessage() method.

To fix that it should throw a common java exception like IllegalStateException.
2017-03-09 21:22:18 +08:00
Clebert Suconic fe0ca4d84f ARTEMIS-1009 Pure Message Encoding.
with this we could send and receive message in their raw format,
without requiring conversions to Core.

- MessageImpl and ServerMessage are removed as part of this
- AMQPMessage and CoreMessage will have the specialized message format for each protocol
- The protocol manager is now responsible to send the message
- The message will provide an encoder for journal and paging
2017-03-05 23:08:53 -05:00
Justin Bertram ff3e75d148 NO-JIRA move RoutingType to different package 2017-02-13 09:50:41 -06:00
Justin Bertram 0d1fa83181 ARTEMIS-922 Addressing-related API clean-up 2017-01-16 14:40:42 -05:00
jbertram a88853fe53 ARTEMIS-788 Stomp refactor + track autocreation for addresses 2016-12-09 18:43:15 +00:00
Andy Taylor 0189f156ec ARTEMIS-876 Remove JMS JMX Objects and add new Address JMX objects 2016-12-09 18:43:15 +00:00
jbertram 84e8a87325 ARTEMIS-876 Remove all reliances on JMS prefixing 2016-12-09 18:43:15 +00:00
Clebert Suconic b8104f6b7e NO-JIRA: Test fixes and speed ups 2016-11-09 14:35:47 -05:00
Clebert Suconic 6afde8f45a ARTEMIS-822 Review journal threading model
https://issues.apache.org/jira/browse/ARTEMIS-822
2016-10-28 16:54:59 -04:00
Clebert Suconic e0021252ee ARTEMIS-829 Removing messages re-encoding
https://issues.apache.org/jira/browse/ARTEMIS-829
2016-10-28 16:54:58 -04:00
Clebert Suconic e49eda9664 NO-JIRA fixing byteman (extra tests)
Two issues encountered here:

i - ClosingConnectionTest was intermittently breaking other tests, in particular it was breaking PagingLeakTest for no apparent reason
  . apparently it was a dead lock from removeAddress on the ServerController

ii - it still showing issues after removing the not needed synchronziation. Since the test is not really needed I am just removing the offending test.
2016-10-28 16:32:04 -04:00
Clebert Suconic 374f142edb fixing build for LargeMessageOverReplicationTest 2016-10-10 10:12:22 +02:00
Clebert Suconic ec48f9ed00 ARTEMIS-765 Improve Checkstyle 2016-09-30 11:12:09 -04:00
Clebert Suconic 4e349693f4 Fixing build on extra-tests 2016-09-27 09:21:25 -04:00
Ville Skyttä c890164fda Use try-with-resources some more 2016-07-29 15:32:57 -04:00
Ville Skyttä 04eed1b7f4 Fix some potential NPEs in examples and tests 2016-07-28 23:30:02 +03:00
Ville Skyttä 68c7c2575d Remove dead code 2016-07-28 12:28:18 -04:00
Ville Skyttä 429e1e84d4 Remove unnecessary casts 2016-07-28 18:12:59 +03:00
Ville Skyttä 39edf958a1 Add missing @Override annotations 2016-07-19 16:09:12 +01:00
Francesco Nigro 36555a10c5 ARTEMIS-623/ARTEMIS-622 Added memory mapped impl of Sequential File + benchs.
Added experimental GCFree Journal impl + benchs + Sequentially Encoded Aligned Binary Protocol.

https://issues.apache.org/jira/browse/ARTEMIS-622
https://issues.apache.org/jira/browse/ARTEMIS-623
2016-07-11 13:36:47 -04:00
Clebert Suconic 5dc5a242bb ARTEMIS-577 & ARTEMIS-596 Fixing API compatibility.
This is also fixing a build issue.
2016-06-27 12:08:11 -04:00
Tom Ross 5bca681c1a ARTEMIS-596 JMS Bridge messages should be identified.
In cases where there are many JMS bridges defined on a broker it should
be possible to identify any error message by a bridge name.
2016-06-24 16:11:29 +01:00
Ville Skyttä 3923ae45f4 Fix checkstyle redundant modifier violations 2016-06-13 20:03:54 +03:00
Clebert Suconic 2e6586548b ARTEMIS-552 Replication target being finished can lead to instability on live
https://issues.apache.org/jira/browse/ARTEMIS-552
2016-06-06 16:28:51 -04:00
Erich Duda a622fa7443 ARTEMIS-518 - Improvement of default thread factory 2016-05-09 14:33:41 -04:00
jbertram 19147113cb Fix RaceOnSyncLargeMessageOverReplication2Test 2016-05-05 20:21:18 -05:00
Andy Taylor f4f35fc2f5 fixing test
create consumer before sending message so queue is auto created
2016-05-05 13:00:53 +01:00
jbertram 1d770e49f0 Fix RaceOnSyncLargeMessageOverReplicationTest 2016-05-04 15:28:23 -05:00