Default shard-journal-recovery-log-batch-size to 1 58/37158/1
authorTom Pantelis <tpanteli@brocade.com>
Mon, 4 Apr 2016 14:58:08 +0000 (10:58 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 5 Apr 2016 18:51:59 +0000 (18:51 +0000)
commit69ca63911e1e3ef544e555d4c487d03831b40390
treeedb71b4f192ba2ecfd348a88dfeb2cc02175b32f
parentf93b17ba71874d70af4c243017eed23c3a36e63c
Default shard-journal-recovery-log-batch-size to 1

In Helium there was an issue with batching journal log entries in a
single transaction on recovery which could cause validation exceptions
and/or missing data. Setting the batch size to 1 alleviated the issue and
thus it was defaulted to 1.

It was thought this issue wasn't present in Lithium but it is as I have
a Helium journal which exhibits the problem. I have tried this journal
with the current code base and didn't see an issue (it looked like all
data was recovered from what I could tell) but I'm not confident an issue
isn't still lurking with the right combination of modifications across
many journal transactions. It is safest to recover the transactions in the
same manner as they were originally committed, ie one by one.

Therefore I have defaulted the batch size to 1. In my testing, the prior
setting of 1000 doesn't add any value anyway as the recovery time is
virtually the same with batch size 1000 and 1. Setting it to 1
eliminates the potential risk of data loss.

Change-Id: Icd7fd3c60bdd6cf1b677ccae38be810e779d2bd3
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit 28313ad901a88b4a5e5e9f54da0368c7171ca080)
opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/datastore.cfg
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang