BUG 3249 : Operation Limiter not release on completion of operation 80/20680/3
authorMoiz Raja <moraja@cisco.com>
Mon, 18 May 2015 21:12:08 +0000 (14:12 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 19 May 2015 07:40:07 +0000 (07:40 +0000)
commit7deb48eedb9aec8230c65237c48679ecca6af919
tree6d76287961e06016d972b81e27bf9f3c15821076
parent2f2dd5376f885a160d3204a407f24e174375a5a5
BUG 3249 : Operation Limiter not release on completion of operation

The OperationLimiter uses up one permit and per operation done on a
transaction. When that operation is complete the permit must be
released. For Local transactions this was not happening. Due to this
when a local transaction has more operations than the maximum outstanding
operations we would block for the operation timeout period (5 seconds
by default) this can have all sorts of adverse side effects on
transactions.

This patch ensures that for local transactions those permits are freed
up when the operation is complete.

Change-Id: Id8ba99c6ea081c7e37da0b517860dca818a91218
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionContextFactory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContext.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContextTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java