Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-838

AbstractPingPongTransactionChain is not idempotent

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • 3.0.16, 4.0.17, 5.0.17, 6.0.12, 7.0.14, 8.0.16, 9.0.8, 10.0.8, 11.0.12, 12.0.1
    • 10.0.9, 11.0.13, 12.0.2
    • DOM API

    Description

      The following is reported during NetconfDeviceTopologyAdapter shutdown:

      2023-08-31T22:31:51,461 | ERROR | CommitFutures-2  | AbstractFuture                   | 46 - com.google.guava - 32.1.2.jre | RuntimeException while executing runnable CallbackListener{org.opendaylight.mdsal.binding.dom.adapter.BindingDOMTransactionChainAdapter$3@3e776ba1} with executor MoreExecutors.directExecutor()
      java.lang.IllegalStateException: Attempted to close an already-closed chain
              at com.google.common.base.Preconditions.checkState(Preconditions.java:512) ~[bundleFile:?]
              at org.opendaylight.mdsal.dom.spi.AbstractPingPongTransactionChain.close(AbstractPingPongTransactionChain.java:389) ~[bundleFile:?]
              at org.opendaylight.mdsal.binding.dom.adapter.BindingDOMTransactionChainAdapter.close(BindingDOMTransactionChainAdapter.java:116) ~[bundleFile:?]
              at org.opendaylight.netconf.topology.spi.NetconfDeviceTopologyAdapter.onTransactionChainFailed(NetconfDeviceTopologyAdapter.java:127) ~[bundleFile:?]
              at org.opendaylight.mdsal.binding.dom.adapter.BindingDOMTransactionChainAdapter.failTransactionChain(BindingDOMTransactionChainAdapter.java:111) ~[bundleFile:?]
              at org.opendaylight.mdsal.binding.dom.adapter.BindingDOMTransactionChainAdapter$3.onFailure(BindingDOMTransactionChainAdapter.java:92) ~[bundleFile:?]
              at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1119) ~[bundleFile:?]
              at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?]
              at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1286) ~[bundleFile:?]
              at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1055) ~[bundleFile:?]
              at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:807) ~[bundleFile:?]
              at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:105) ~[bundleFile:?]
              at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?]
              at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1286) ~[bundleFile:?]
              at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1055) ~[bundleFile:?]
              at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:807) ~[bundleFile:?]
              at com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:55) ~[bundleFile:?]
              at org.opendaylight.mdsal.dom.spi.PingPongTransaction.onFailure(PingPongTransaction.java:56) ~[bundleFile:?]
              at org.opendaylight.mdsal.dom.spi.AbstractPingPongTransactionChain.transactionFailed(AbstractPingPongTransactionChain.java:295) ~[bundleFile:?]
              at org.opendaylight.mdsal.dom.spi.AbstractPingPongTransactionChain$2.onFailure(AbstractPingPongTransactionChain.java:242) ~[bundleFile:?]
              at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1127) ~[bundleFile:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
              at java.lang.Thread.run(Thread.java:833) ~[?:?]
      

      This is part of NETCONF-1146, i.e. we have shut down the chain, but the last transaction failed to commit, hence the callback, where we do follow the API spec and issue another close().

      Now DOMTransactionChain.close() is supposed to be idempotent to the best of its abilities, as implied by AutoCloseable.close() and the spirit of Registration.close(). Audit AbstractPingPongTransactionChain.close() and make sure it is idempotent.

      Attachments

        Issue Links

          # Subject Branch Project Status CR V

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: