Migrate Assert.assertThat() This method has been migrated, make sure we use its new place. Change-Id: Ib17471706233150f26a452b8bca36914a95fc8db Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Poison entries outside of main lock Poisoning entries may involve reaction from their callbacks, which can attempt to circle back through connections. Make sure we poison them outside of lock context, so that any callbacks end up seeing a poisoned connection, but without the lock being held -- hence the locks can be acquired in-order. JIRA: CONTROLLER-1893 Change-Id: I26551d052307812e76f3e45024a77dbb83312b17 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove unused exceptions This drops exception declarations which are never used. Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Migrate from JavaTestKit to javadsl.TestKit Remove use of deprecated class and use its 2.5.0 replacement. This leaves a single instance of this class are RaftActorTestKit and ShartTestKit which will need to be migrated in a follow-up patch. Change-Id: I5c112f9984bec3ecf2da530f3505aceb83fa1e05 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
BUG-8619: do not touch forward path during purge enqueue In case of a purge request, the request is sent from the head of a connection chain (i.e. the original connection which created the transaction) and propagated via forwarders. This path needs to make sure it does not go via throttling, as it is an internal detail. Separate the transmit paths a bit more, so that TransmitQueue can push messages to forwarders' replay path. Change-Id: I5e146b8d11e8654b4beae3959207efb9c2f18315 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit b83c7f5e5cdaee5f250988182dccb749ac7432c2)
BUG-8403: guard against ConcurrentModificationException Using TransmitQueue.asIterable() offers slight advantage of not dealing with a big list, but exposes us to the risk of the Iterable being changed. The point missed by the fix to BUG 8491 is that there is an avenue for the old connection to be touched during replay, as we are completing entries, for example reads when we are switching from remote to local connection. In this case the callback will be invoked in the actor thread, with all the locks being reentrant and held, hence it can break through to the old connection's queue. If that happens we will see a ConcurrentModificationException and enter a buggy territory, where the client fails to work properly. Document this caveat and turn asIterable() into drain(), which removes all the entries in the queue, allowing new entries to be enqueued. The late-comer entries are accounted for when we set the forwarder. Change-Id: Idf29c1e565e12aaed917ac94c21c552daf169d4d Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 930747a6ba5d888d2fbe54473132680e4621d858)
Add TransmitQueue unit tests Change-Id: Id7067db80a3ba4f8befec1b8bccf764db2419eb7 Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>