From 687be5ebc851127bc9579a41c74253e2c145d9a9 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 1 Jul 2021 10:48:11 +0200 Subject: [PATCH] Remove obsolete datastore.cfg properties We have a number of leftovers here, which have been no-ops. Remove them to reduce code clutter. JIRA: CONTROLLER-1984 Change-Id: I490188fb7ebc83c344997861d637852f40fce7a6 Signed-off-by: Robert Varga --- .../src/main/resources/initial/datastore.cfg | 18 +------------- .../cluster/datastore/DatastoreContext.java | 20 ---------------- .../yang/distributed-datastore-provider.yang | 24 ------------------- .../DatastoreContextIntrospectorTest.java | 5 ---- .../datastore/DatastoreContextTest.java | 9 ------- 5 files changed, 1 insertion(+), 75 deletions(-) diff --git a/opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/datastore.cfg b/opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/datastore.cfg index 6ce9fc2703..f6566523b6 100644 --- a/opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/datastore.cfg +++ b/opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/datastore.cfg @@ -77,22 +77,6 @@ operational.persistent=false # measures the latency for a commit and auto-adjusts the rate limit. #transaction-creation-initial-rate-limit=100 -# The maximum thread pool size for each shard's data store data change notification executor. -# THIS SETTING HAS HAD NO EFFECT FOR A LONG TIME, IS DEPRECATED, AND WILL BE REMOVED IN A FUTURE RELEASE -#max-shard-data-change-executor-pool-size=20 - -# The maximum queue size for each shard's data store data change notification executor. -# THIS SETTING HAS HAD NO EFFECT FOR A LONG TIME, IS DEPRECATED, AND WILL BE REMOVED IN A FUTURE RELEASE -#max-shard-data-change-executor-queue-size=1000 - -# The maximum queue size for each shard's data store data change listener. -# THIS SETTING HAS HAD NO EFFECT FOR A LONG TIME, IS DEPRECATED, AND WILL BE REMOVED IN A FUTURE RELEASE -#max-shard-data-change-listener-queue-size=1000 - -# The maximum queue size for each shard's data store executor. -# THIS SETTING HAS HAD NO EFFECT FOR A LONG TIME, IS DEPRECATED, AND WILL BE REMOVED IN A FUTURE RELEASE -#max-shard-data-store-executor-queue-size=5000 - # A fully qualified java class name. The class should implement # org.opendaylight.controller.cluster.raft.policy.RaftPolicy. This java class should be # accessible to the distributed data store OSGi module so that it can be dynamically loaded via @@ -151,4 +135,4 @@ snapshot-on-root-overwrite=false export-on-recovery=off # Directory name for export files -#recovery-export-base-dir=persistence-export \ No newline at end of file +#recovery-export-base-dir=persistence-export diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java index 7682c64109..28fb89d2be 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContext.java @@ -602,26 +602,6 @@ public class DatastoreContext implements ClientActorConfig { return this; } - @Deprecated(forRemoval = true) - public Builder maxShardDataChangeExecutorPoolSize(final int newMaxShardDataChangeExecutorPoolSize) { - return this; - } - - @Deprecated(forRemoval = true) - public Builder maxShardDataChangeExecutorQueueSize(final int newMaxShardDataChangeExecutorQueueSize) { - return this; - } - - @Deprecated(forRemoval = true) - public Builder maxShardDataChangeListenerQueueSize(final int newMaxShardDataChangeListenerQueueSize) { - return this; - } - - @Deprecated(forRemoval = true) - public Builder maxShardDataStoreExecutorQueueSize(final int newMaxShardDataStoreExecutorQueueSize) { - return this; - } - public Builder useTellBasedProtocol(final boolean value) { datastoreContext.useTellBasedProtocol = value; return this; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang index a51a18cc16..3ad7d532ad 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang @@ -39,30 +39,6 @@ module distributed-datastore-provider { } grouping data-store-properties { - leaf max-shard-data-change-executor-queue-size { - default 1000; - type non-zero-uint32-type; - description "The maximum queue size for each shard's data store data change notification executor."; - } - - leaf max-shard-data-change-executor-pool-size { - default 20; - type non-zero-uint32-type; - description "The maximum thread pool size for each shard's data store data change notification executor."; - } - - leaf max-shard-data-change-listener-queue-size { - default 1000; - type non-zero-uint32-type; - description "The maximum queue size for each shard's data store data change listener."; - } - - leaf max-shard-data-store-executor-queue-size { - default 5000; - type non-zero-uint32-type; - description "The maximum queue size for each shard's data store executor."; - } - leaf shard-transaction-idle-timeout-in-minutes { default 10; type non-zero-uint32-type; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java index d0a28822eb..924f1de1ff 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java @@ -71,10 +71,6 @@ public class DatastoreContextIntrospectorTest { properties.put("shard-election-timeout-factor", "21"); properties.put("shard-batched-modification-count", "901"); properties.put("transactionCreationInitialRateLimit", "200"); - properties.put("MaxShardDataChangeExecutorPoolSize", "41"); - properties.put("Max-Shard-Data-Change Executor-Queue Size", "1111"); - properties.put(" max shard data change listener queue size", "2222"); - properties.put("mAx-shaRd-data-STORE-executor-quEUe-size", "3333"); properties.put("persistent", "false"); properties.put("initial-payload-serialized-buffer-capacity", "600"); properties.put("export-on-recovery", "json"); @@ -159,7 +155,6 @@ public class DatastoreContextIntrospectorTest { properties.put("shard-snapshot-data-threshold-percentage", "101"); // bad - must be 0-100 properties.put("shard-snapshot-data-threshold", "-1"); // bad - must be > 0 properties.put("shard-initialization-timeout-in-seconds", "-1"); // bad - must be > 0 - properties.put("max-shard-data-change-executor-pool-size", "bogus"); // bad - NaN properties.put("unknownProperty", "1"); // bad - invalid property name final boolean updated = introspector.update(properties); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextTest.java index 0917a52583..50bd790936 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextTest.java @@ -34,7 +34,6 @@ import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEF import java.util.concurrent.TimeUnit; import org.junit.Assert; import org.junit.Test; -import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStoreConfigProperties; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStoreProperties.ExportOnRecovery; public class DatastoreContextTest { @@ -101,14 +100,6 @@ public class DatastoreContextTest { builder.shardElectionTimeoutFactor(DEFAULT_SHARD_ELECTION_TIMEOUT_FACTOR + 1); builder.transactionCreationInitialRateLimit(DEFAULT_TX_CREATION_INITIAL_RATE_LIMIT + 1); builder.shardBatchedModificationCount(DEFAULT_SHARD_BATCHED_MODIFICATION_COUNT + 1); - builder.maxShardDataChangeExecutorPoolSize( - InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE + 1); - builder.maxShardDataChangeExecutorQueueSize( - InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE + 1); - builder.maxShardDataChangeListenerQueueSize( - InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_LISTENER_QUEUE_SIZE + 1); - builder.maxShardDataStoreExecutorQueueSize( - InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_STORE_EXECUTOR_QUEUE_SIZE + 1); builder.maximumMessageSliceSize(DEFAULT_MAX_MESSAGE_SLICE_SIZE + 1); builder.initialPayloadSerializedBufferCapacity(DEFAULT_INITIAL_PAYLOAD_SERIALIZED_BUFFER_CAPACITY + 1); builder.exportOnRecovery(ExportOnRecovery.Json); -- 2.36.6