BUG-8056: place an upper bound on number of transactions processed 85/56985/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 12 May 2017 13:24:07 +0000 (15:24 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Fri, 12 May 2017 21:35:33 +0000 (21:35 +0000)
commit3613d3cbde81af18aab2d5917491e9f9b3bf63ca
tree411a9becfd17803b2bb771f0ad2dd7492d0f2bc6
parente1c283de301355cb8fa3f7d4fa28a6dd0af501eb
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