X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=benchmark%2Fdsbenchmark%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fdsbenchmark%2Fsimpletx%2FSimpletxDomDelete.java;h=af9ad559e55a858182619dc3a74d7b7676c0eb70;hp=58baedb9c675ce6c1700b129f21920b48ef9d3eb;hb=cfd2e240178039a439001c4d3f1ca5f26097dcdd;hpb=cd184f0a4226f20838c72ac1fdaf6fa19585df3b diff --git a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxDomDelete.java b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxDomDelete.java index 58baedb9c6..af9ad559e5 100644 --- a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxDomDelete.java +++ b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxDomDelete.java @@ -8,8 +8,8 @@ package org.opendaylight.dsbenchmark.simpletx; +import java.util.concurrent.ExecutionException; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction; import org.opendaylight.dsbenchmark.DatastoreAbstractWriter; @@ -67,9 +67,9 @@ public class SimpletxDomDelete extends DatastoreAbstractWriter { writeCnt++; if (writeCnt == writesPerTx) { try { - tx.submit().checkedGet(); + tx.commit().get(); txOk++; - } catch (final TransactionCommitFailedException e) { + } catch (final InterruptedException | ExecutionException e) { LOG.error("Transaction failed: {}", e); txError++; } @@ -79,8 +79,8 @@ public class SimpletxDomDelete extends DatastoreAbstractWriter { } if (writeCnt != 0) { try { - tx.submit().checkedGet(); - } catch (final TransactionCommitFailedException e) { + tx.commit().get(); + } catch (final InterruptedException | ExecutionException e) { LOG.error("Transaction failed: {}", e); } }