BUG-8402: Record modification failures 76/57376/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 17 May 2017 14:56:57 +0000 (16:56 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 18 May 2017 15:33:57 +0000 (17:33 +0200)
commitd9e3fa9b7d4f1ad484931151c3b3ef237a674ab2
tree5fac979c65929d94af8f50bbaaec05505e65f892
parent81eb5a1b66be757a09210c2830c9a1895db4f5b5
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>
(cherry picked from commit 63e6ab3f36e57954baf391855541cf3d42d38a0f)
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