Add AbstractDOMBrokerTransaction.toString() 00/68400/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 23 Jan 2018 18:13:10 +0000 (19:13 +0100)
committerMichael Vorburger <vorburger@redhat.com>
Mon, 19 Feb 2018 10:38:12 +0000 (10:38 +0000)
commit9db0c2407dbca4b9ac3e1a0f3217b3050bfa9797
tree513de8125b5b02c538e275bc476f1d2c7a6debed
parentc983ca95187c03af54867343c8eeb8903e103ea8
Add AbstractDOMBrokerTransaction.toString()

It is quite common for applications to mis-synchronize transaction
chain closure, which may lead to stale transactions. Unfortunately
the message produced in such situations:

2017-12-21 14:21:56,008 | ERROR | CommitFutures-48 | ExecutionList                    | 38 - com.google.guava - 18.0.0 | RuntimeException while executing runnable com.google.common.util.concurrent.Futures$6@6d954ae with executor INSTANCE
java.lang.IllegalStateException: Attempted to close chain with outstanding transaction PingPongTransaction{delegate=org.opendaylight.controller.cluster.databroker.DOMBrokerReadWriteTransaction@7523c916}

does not give us enough information to correlate the impact of such
failures.

Add AbstractDOMBrokerTransaction.toString(), which results
in the message having actual transaction identifier, so that these
failures can be correlated.

Change-Id: Id4620df4285ec6d3ba24bbcd8f5ab8c1a29e0687
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBrokerTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBrokerWriteTransaction.java