These are chat archives for atomix/atomix

26th
May 2016
Kevin Daly
@kedaly
May 26 2016 19:51
Quick question, I'm using Embedding Atomix in unit tests, and once in a while it won't shut down or seems to hang while shutting down.. Has anyone experienced this.. Basically as the tests are firing up an Atomix replica, shutting it down, deleting the data directory, starting it again.. fairly rapidly..
Jordan Halterman
@kuujo
May 26 2016 19:56
L
Ugh
Yeah... I've seen it happen. I think the problem is if you're using LocalTransport (which the test stuff uses) it's not really well suited for testing since it doesn't exactly mimic the behavior of NettyTransport. Specifically, LocalTransport doesn't do timeouts. If an exception occurs - which sometimes happens during shutdown because RejectedExecutionException is thrown by executors - then often a request just never finishes and it hangs. LocalTransport is really just good for what it's used for in Atomix. What's needed is a legitimate TestTransport or tests should just use the NettyTransport now.
Jonathan Halterman
@jhalterman
May 26 2016 21:13
@kuujo any mitigating this in LocalTransport?
Jordan Halterman
@kuujo
May 26 2016 21:19
No... Need to add a TestTransport. The problem with LocalTransport is that it's legitimately used in AtomixReplica to send messages directly to the local server without using the loopback interface. So, because of that it doesn't do serialization or timeouts since serialization is expensive and timeouts are unnecessary in the replica. We need a TestTransport that more closely mimics NettyTransport if we're not using networks in some tests.
Jonathan Halterman
@jhalterman
May 26 2016 21:20
Cool - @kedaly the cost of hitting the network via NettyTransport, for now, shouldn't be too prohibitive for tests.