Do not reset datasize after a fake snapshot 79/91679/11
authortadei.bilan <tadei.bilan@pantheon.tech>
Mon, 27 Jul 2020 10:18:29 +0000 (13:18 +0300)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 22 Oct 2020 18:45:40 +0000 (20:45 +0200)
commitff29db5dc6012f77bbe53f57ddce929b0de093b3
tree0c11fa0e23ca94f865ac6c971e5098fd23548f46
parente96021b2e492bbaf7efe0804628bfe055b9733f7
Do not reset datasize after a fake snapshot

If we reset dataSize from SnapshotManager's fake snapshot, we would
not have correctly accounted for on-disk size.

Fix this by exposing a simple knob, which allows suppressing dataSize
update during snapshotCommit().

JIRA: CONTROLLER-1957
Change-Id: I553ddb523ac8504892cc5353bfe4b002c25436ce
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/AbstractReplicatedLogImpl.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLog.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/SnapshotManager.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicatedLogImplTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/SnapshotManagerTest.java