Move OperationLimiter.acquire() warnings to callers 01/68401/4
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 23 Jan 2018 16:42:44 +0000 (17:42 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 28 Feb 2018 17:37:17 +0000 (18:37 +0100)
commit6a0fab98dc4d16a52922c6594f99a97d4050e800
tree913686fe926abc3722bce9ad05cf9f7876d67359
parent7925d904ffd56c13ddde53e0e7bf6b08b437757d
Move OperationLimiter.acquire() warnings to callers

We have two distinct call sites from where we are acquiring permits,
where failure to acquire has different root cause:
RemoteTransactionContext's failure to acquire indicates a slow leader,
while TransactionContextWrapper indicates a failure to discover a leader
in time.

Modify acquire() to report success and log failures to acquire from
the two call sites, with different messages so it is immediately clear
what is going on.

Change-Id: Ie828984c6a984690224494af1a9fdd0e4f257fab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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/OperationLimiter.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapper.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapperTest.java