Return a NoOpTransactionContext when the Primary for a shard is not found 36/9636/1
authorMoiz Raja <moraja@cisco.com>
Sun, 3 Aug 2014 19:23:16 +0000 (12:23 -0700)
committerMoiz Raja <moraja@cisco.com>
Sun, 3 Aug 2014 22:36:45 +0000 (15:36 -0700)
commitc5511f1c95ce9ce754e78df840b56e8681bbae2d
tree8bf2b6bc9e199c0073b9e691821d1215572dfdbb
parentb584e686fdeba863643f80c0894d7fbd2dcaa540
Return a NoOpTransactionContext when the Primary for a shard is not found

A NoOpTransactionContext is returned when a request to create a transaction
results in the primary not being found or when the request times out.

A CanCommit on the NoOpTransaction will always false. A read
will always return an empty result. The consumer will need to deal with this situation.

Change-Id: Id6f7d0688921acac718b9bb06fbf03d5e345d7ac
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java