# Enable tell-based protocol between frontend (applications) and backend (shards). Using this protocol
# should avoid AskTimeoutExceptions seen under heavy load. Defaults to false (use tell-based protocol).
# Set to false to enable ask-based protocol.
+# This option is obsolete and will be removed in the next major release.
use-tell-based-protocol=true
# Tune the maximum number of entries a follower is allowed to lag behind the leader before it is
private int shardBatchedModificationCount = DEFAULT_SHARD_BATCHED_MODIFICATION_COUNT;
private boolean writeOnlyTransactionOptimizationsEnabled = true;
private long shardCommitQueueExpiryTimeoutInMillis = DEFAULT_SHARD_COMMIT_QUEUE_EXPIRY_TIMEOUT_IN_MS;
+ @Deprecated(since = "7.0.0", forRemoval = true)
private boolean useTellBasedProtocol = true;
private boolean transactionDebugContextEnabled = false;
private String shardManagerPersistenceId;
return transactionDebugContextEnabled;
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public boolean isUseTellBasedProtocol() {
return useTellBasedProtocol;
}
return this;
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public Builder useTellBasedProtocol(final boolean value) {
datastoreContext.useTellBasedProtocol = value;
return this;
import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
/**
- * Implements a distributed DOMStore using Akka Patterns.ask().
+ * Implements a distributed DOMStore using Akka {@code Patterns.ask()}.
+ *
+ * @deprecated This implementation is destined for removal,
*/
+@Deprecated(since = "7.0.0", forRemoval = true)
public class DistributedDataStore extends AbstractDataStore {
-
private final TransactionContextFactory txContextFactory;
public DistributedDataStore(final ActorSystem actorSystem, final ClusterWrapper cluster,
final Configuration configuration, final DatastoreContextFactory datastoreContextFactory,
final DatastoreSnapshot restoreFromSnapshot) {
super(actorSystem, cluster, configuration, datastoreContextFactory, restoreFromSnapshot);
- this.txContextFactory = new TransactionContextFactory(getActorUtils(), getIdentifier());
+ txContextFactory = new TransactionContextFactory(getActorUtils(), getIdentifier());
}
@VisibleForTesting
DistributedDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier) {
super(actorUtils, identifier);
- this.txContextFactory = new TransactionContextFactory(getActorUtils(), getIdentifier());
+ txContextFactory = new TransactionContextFactory(getActorUtils(), getIdentifier());
}
} else {
dataStore = new DistributedDataStore(actorSystem, clusterWrapper, config, contextFactory,
restoreFromSnapshot);
- LOG.info("Data store {} is using ask-based protocol", datastoreName);
+ LOG.warn("Data store {} is using ask-based protocol, which will be removed in the next major release",
+ datastoreName);
}
return dataStore;
}
leaf use-tell-based-protocol {
+ status obsolete;
default false;
type boolean;
description "Use a newer protocol between the frontend and backend. This feature is considered
import org.junit.Test;
import org.mockito.InOrder;
import org.mockito.stubbing.Answer;
-import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
+import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.mdsal.common.api.CommitInfo;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
@Test
public void testExtensions() {
- DistributedDataStore mockConfigStore = mock(DistributedDataStore.class);
- DistributedDataStore mockOperStore = mock(DistributedDataStore.class);
+ final var mockConfigStore = mock(AbstractDataStore.class);
+ final var mockOperStore = mock(AbstractDataStore.class);
try (ConcurrentDOMDataBroker dataBroker = new ConcurrentDOMDataBroker(ImmutableMap.of(
LogicalDatastoreType.OPERATIONAL, mockOperStore,
LogicalDatastoreType.CONFIGURATION, mockConfigStore), futureExecutor)) {
return datastoreContextBuilder;
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStore(final String typeName, final String moduleShardsConfig,
final boolean waitUntilLeader,
final EffectiveModelContext schemaContext) throws Exception {
return setupDistributedDataStore(typeName, moduleShardsConfig, "modules.conf", waitUntilLeader, schemaContext);
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStore(final String typeName, final String moduleShardsConfig,
final String modulesConfig,
final boolean waitUntilLeader,
}
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName,
final EffectiveModelContext schemaContext) {
final ClusterWrapper cluster = new ClusterWrapperImpl(getSystem());
return dataStore;
}
+ @Deprecated(since = "7.0.0", forRemoval = true)
public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName,
final EffectiveModelContext schemaContext,
final LogicalDatastoreType storeType) {
import org.opendaylight.controller.cluster.datastore.shardmanager.TestShardManager;
import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
+@Deprecated(since = "7.0.0", forRemoval = true)
public class TestDistributedDataStore extends DistributedDataStore implements LocalShardStore {
public TestDistributedDataStore(final ActorSystem actorSystem, final ClusterWrapper cluster,
import org.mockito.junit.MockitoJUnitRunner;
import org.opendaylight.controller.cluster.access.concepts.MemberName;
import org.opendaylight.controller.cluster.datastore.AbstractClusterRefActorTest;
+import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.controller.cluster.datastore.ClusterWrapperImpl;
import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
import org.opendaylight.controller.cluster.datastore.DatastoreContext;
import org.opendaylight.controller.cluster.datastore.DatastoreContextFactory;
-import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
import org.opendaylight.controller.cluster.datastore.Shard;
import org.opendaylight.controller.cluster.datastore.config.Configuration;
import org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl;
}
private TestShardManager.Builder newTestShardMgrBuilder() {
- return TestShardManager.builder(datastoreContextBuilder).distributedDataStore(mock(DistributedDataStore.class));
+ return TestShardManager.builder(datastoreContextBuilder).distributedDataStore(mock(AbstractDataStore.class));
}
private TestShardManager.Builder newTestShardMgrBuilder(final Configuration config) {
return TestShardManager.builder(datastoreContextBuilder).configuration(config)
- .distributedDataStore(mock(DistributedDataStore.class));
+ .distributedDataStore(mock(AbstractDataStore.class));
}
private Props newShardMgrProps() {
private TestShardManager.Builder newTestShardMgrBuilderWithMockShardActor(final ActorRef shardActor) {
return TestShardManager.builder(datastoreContextBuilder).shardActor(shardActor)
- .distributedDataStore(mock(DistributedDataStore.class));
+ .distributedDataStore(mock(AbstractDataStore.class));
}