BUG-8056: place an upper bound on number of transactions processed 48/56948/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 12 May 2017 13:24:07 +0000 (15:24 +0200)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 15 May 2017 15:17:15 +0000 (15:17 +0000)
commit0bf09a40113960a31e0b4fc66f60cabc6eb6929a
tree2c75a926edb2b89215802338144fccf230da1411
parent17e4759c7561e09786a22210e43b5b32db45149e
BUG-8056: place an upper bound on number of transactions processed

When transactions complete their preCommit step immediately we end
up scheduling the next transaction immediately in the call stack,
hence if that completes immediately we end up eating away our stack
until we hit StackOverflowError.

Limit the number of transactions we process as a reaction to a single
message so that stack usage is under control. Should we hit this
limit, schedule a contiuation, which will deal with the rest of
the transactions.

Change-Id: Iad2812c823bd8e91ad45020ac50f6a8626654afb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java