BUG 2463 - Changing setting for shard-snapshot-data-threshold-percentage does not... 41/13341/2
authorMoiz Raja <moraja@cisco.com>
Wed, 3 Dec 2014 13:20:33 +0000 (05:20 -0800)
committerMoiz Raja <moraja@cisco.com>
Fri, 5 Dec 2014 00:49:08 +0000 (00:49 +0000)
This was missed by the commit which introduced this setting. It was not read from the config
and set on the DataStoreContext. This meant that the default (12 percent) was used regardless
of the actual setting.

Also changed the name of the stat to InMemoryJournalDataSize instead of just DataSize to be
more clear

Change-Id: Iaffddb3e614db7a270d847ba219801e36c8a64e0
Signed-off-by: Moiz Raja <moraja@cisco.com>
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/jmx/mbeans/shard/ShardStats.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardStatsMXBean.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java

index af16d02..a22e535 100644 (file)
@@ -788,7 +788,7 @@ public class Shard extends RaftActor {
 
         shardMBean.setCommitIndex(getCommitIndex());
         shardMBean.setLastApplied(getLastApplied());
-        shardMBean.setDataSize(getRaftActorContext().getReplicatedLog().dataSize());
+        shardMBean.setInMemoryJournalDataSize(getRaftActorContext().getReplicatedLog().dataSize());
     }
 
     @Override
index 4fc2ed2..945ae0a 100644 (file)
@@ -220,12 +220,12 @@ public class ShardStats extends AbstractMXBean implements ShardStatsMXBean {
         this.lastCommittedTransactionTime = lastCommittedTransactionTime;
     }
 
-    public void setDataSize(long dataSize){
+    public void setInMemoryJournalDataSize(long dataSize){
         this.dataSize = dataSize;
     }
 
     @Override
-    public long getDataSize(){
+    public long getInMemoryJournalDataSize(){
         return dataSize;
     }
 
index 8eb653a..2db4879 100644 (file)
@@ -53,6 +53,7 @@ public class DistributedConfigDataStoreProviderModule extends
                 .shardJournalRecoveryLogBatchSize(props.getShardJournalRecoveryLogBatchSize().
                         getValue().intValue())
                 .shardSnapshotBatchCount(props.getShardSnapshotBatchCount().getValue().intValue())
+                .shardSnapshotDataThresholdPercentage(props.getShardSnapshotDataThresholdPercentage().getValue().intValue())
                 .shardHeartbeatIntervalInMillis(props.getShardHearbeatIntervalInMillis().getValue())
                 .shardInitializationTimeout(props.getShardInitializationTimeoutInSeconds().getValue(),
                         TimeUnit.SECONDS)
index 2a12aff..866807e 100644 (file)
@@ -53,6 +53,7 @@ public class DistributedOperationalDataStoreProviderModule extends
                 .shardJournalRecoveryLogBatchSize(props.getShardJournalRecoveryLogBatchSize().
                         getValue().intValue())
                 .shardSnapshotBatchCount(props.getShardSnapshotBatchCount().getValue().intValue())
+                .shardSnapshotDataThresholdPercentage(props.getShardSnapshotDataThresholdPercentage().getValue().intValue())
                 .shardHeartbeatIntervalInMillis(props.getShardHearbeatIntervalInMillis().getValue())
                 .shardInitializationTimeout(props.getShardInitializationTimeoutInSeconds().getValue(),
                         TimeUnit.SECONDS)

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.