As evidenced in the logs, we can end up looping on shutdownTx
multiple times -- if it is completed by the time we pick it up
processNextTransaction().
Since it is already completed, our callback executes immediately through
processTransaction() and loops back to processNextTransaction() -- and
we pick it up again and try to commit() it again.
Fix this thinko by clearing shutdownTx before we pass the transaction
to processTransaction() -- hence if we re-enter, we will just observe
shutdownTx as null and do nothing.
JIRA: MDSAL-872
Change-Id: I2d92000fc76d374aeaf354734d80b128d2709cfb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
if (nextTx == null) {
final PingPongTransaction local = shutdownTx;
if (local != null) {
+ shutdownTx = null;
processTransaction(local);
delegate.close();
- shutdownTx = null;
}
} else {
processTransaction(nextTx);