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 af16d02eea2909ee75e83e2b62dc58bc633b7031..a22e535fad1f6fa7052121c6be736a299e0b48cb 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 4fc2ed2d0691c400ce04eb04482e0794bfef217b..945ae0a4786ab931a62c071533ec89842847a84e 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 8eb653a44feb54731c840549d54ca24cafacc292..2db487952b01cdeac2ea1567d0bc5fe793b88f30 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 2a12aff4ef321b35c79c9ca491ac532045f56a36..866807e141cf9cc4781a36e0d03f4f84f97cd264 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)