BUG-8402: Record modification failures 93/57293/6
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 17 May 2017 14:56:57 +0000 (16:56 +0200)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 18 May 2017 15:12:32 +0000 (15:12 +0000)
commit63e6ab3f36e57954baf391855541cf3d42d38a0f
tree33fb95ba7509c0bfbc021c8e1133d99b0c45537a
parentd02d60083ee163cf465c265364c21c0df9cdc3c7
BUG-8402: Record modification failures

When a modification fails to apply, we must record the resulting
failure, as we have partially applied the state and hence should
never attempt to try to do it again even if the client retransmits
the request.

Furthermore we should stop responding to any subsequent requests
including reads, as our responses are not accurate anyway (and the
requests may have been enqueued before the client saw the failure).

Enqueue the failure and respond to all subsequent requests with it,
forcing the transaction to fail the canCommit() phase.

Change-Id: I1d25f1b3a688e02f8a69f54f22a5d6d2dd43339c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/TransactionModification.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendReadOnlyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendReadWriteTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendTransaction.java