BUG 2676 : Apply backpressure when creating transactions
This patch uses a rate limiter to limit the number of write transactions
that can be created on the datastore at any given point of time (within a
second).
We also have added a metric that is trackable using JMX which will show
exactly how much time we take in committing a transaction.
Could this rate limiter have been on the DataBroker? Yes it could have been
but I think we need to go granular on this one. Ideally the ratelimiter would
be for every shard transaction but it's not trivial to do in a way that would
actually block the consumer for now - this is because creating a transaction on
Shard itself is an async operation.
Change-Id: I3d8e3baeb892ba494c0ab0d13a0d6226c1516511
Signed-off-by: Moiz Raja <moraja@cisco.com>
12 files changed: