Fix lead transaction cancellation 69/100869/4
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Apr 2022 16:08:23 +0000 (18:08 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 29 Apr 2022 09:43:42 +0000 (09:43 +0000)
commite781d0af7effb145dc69163744d1a7f02c200d8e
tree777c4a3e47e2bc69d4f6e08323b40b47dcb6a2ad
parent29eb8d9e5d12d6514718e9bb9badb8ccbf2ab268
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>
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