Fix lead transaction cancellation 70/101070/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Apr 2022 16:08:23 +0000 (18:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 11 May 2022 11:52:12 +0000 (13:52 +0200)
commitffff4fed954fb1b7079d7db7d738fe951bf285a9
tree0ef73c0163f1d020fb8d9e1bb38e1ed7eaa40902
parent627d39e86ae919c8faadbb0715d21783f851a596
Fix lead transaction cancellation

We have a thinko around recording frontend transaction, which leads
to us always cancelling the entire chain. This is not correct, as
evidenced by existing tests.

Correct the book keeping and refactor cancelTransaction() to allow
returning correct result of operation and handle the case where backend
refuses to cancel.

JIRA: MDSAL-756
Change-Id: I553e4de2d09acedf67af63bc292fae0bb5dfed78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e781d0af7effb145dc69163744d1a7f02c200d8e)
(cherry picked from commit 5efad8eb9dec08e7a0eb00e105385c81598863c2)
dom/mdsal-dom-spi/src/main/java/org/opendaylight/mdsal/dom/spi/PingPongTransaction.java
dom/mdsal-dom-spi/src/main/java/org/opendaylight/mdsal/dom/spi/PingPongTransactionChain.java
dom/mdsal-dom-spi/src/test/java/org/opendaylight/mdsal/dom/spi/PingPongTransactionChainTest.java