Improve aborted transaction logging 26/80426/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 20 Feb 2019 13:47:12 +0000 (14:47 +0100)
committerRobert Varga <nite@hq.sk>
Wed, 20 Feb 2019 22:08:41 +0000 (22:08 +0000)
commit248c54ba5b6a8262b128ce397fa03d17b7ae6540
tree5f3d019b707ecd1beab321c66bb63dbd554cb2b2
parent6a6c8b35a9c389488f76e221abca9bcd16ceff64
Improve aborted transaction logging

The fact that a snapshot is recorded does not mean it has not been
closed -- in fact write-aspect transactions do not actively remove
themselves.

When we prune recorded snapshots on transaction chain close, we need
to pay attention to the return value of abort(), as that is
indicating whether we should in fact warn about an unclosed
transaction.

This means that the actual set of transactions we warn about cannot
be determined until we have traversed all recorded snapshots, hence
modify the logic to record the identifiers that were in fact aborted
and report all of them in a single message along with a stack trace
so the offender may be identifier.

Change-Id: I8b176f1990c9aa9c056cd03203ea50fb9b9549a0
JIRA: CONTROLLER-1886
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 21eed79684671b9a44e34edbd589419cb9bb6087)
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/ClientBackedTransactionChain.java