2 * Copyright (c) 2014 Brocade Communications Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.datastore;
11 import akka.util.Timeout;
12 import com.google.common.annotations.VisibleForTesting;
13 import com.google.common.base.Preconditions;
15 import java.util.concurrent.ConcurrentHashMap;
16 import java.util.concurrent.TimeUnit;
17 import org.apache.commons.lang3.text.WordUtils;
18 import org.opendaylight.controller.cluster.common.actor.AkkaConfigurationReader;
19 import org.opendaylight.controller.cluster.common.actor.FileAkkaConfigurationReader;
20 import org.opendaylight.controller.cluster.raft.ConfigParams;
21 import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl;
22 import org.opendaylight.controller.cluster.raft.PeerAddressResolver;
23 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
24 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties;
25 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
26 import scala.concurrent.duration.Duration;
27 import scala.concurrent.duration.FiniteDuration;
30 * Contains contextual data for a data store.
32 * @author Thomas Pantelis
34 public class DatastoreContext {
35 public static final String METRICS_DOMAIN = "org.opendaylight.controller.cluster.datastore";
37 public static final Duration DEFAULT_SHARD_TRANSACTION_IDLE_TIMEOUT = Duration.create(10, TimeUnit.MINUTES);
38 public static final int DEFAULT_OPERATION_TIMEOUT_IN_MS = 5000;
39 public static final int DEFAULT_SHARD_TX_COMMIT_TIMEOUT_IN_SECONDS = 30;
40 public static final int DEFAULT_JOURNAL_RECOVERY_BATCH_SIZE = 1;
41 public static final int DEFAULT_SNAPSHOT_BATCH_COUNT = 20000;
42 public static final int DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS = 500;
43 public static final int DEFAULT_ISOLATED_LEADER_CHECK_INTERVAL_IN_MILLIS =
44 DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS * 10;
45 public static final int DEFAULT_SHARD_TX_COMMIT_QUEUE_CAPACITY = 50000;
46 public static final Timeout DEFAULT_SHARD_INITIALIZATION_TIMEOUT = new Timeout(5, TimeUnit.MINUTES);
47 public static final Timeout DEFAULT_SHARD_LEADER_ELECTION_TIMEOUT = new Timeout(30, TimeUnit.SECONDS);
48 public static final boolean DEFAULT_PERSISTENT = true;
49 public static final FileAkkaConfigurationReader DEFAULT_CONFIGURATION_READER = new FileAkkaConfigurationReader();
50 public static final int DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD_PERCENTAGE = 12;
51 public static final int DEFAULT_SHARD_ELECTION_TIMEOUT_FACTOR = 2;
52 public static final int DEFAULT_TX_CREATION_INITIAL_RATE_LIMIT = 100;
53 public static final String UNKNOWN_DATA_STORE_TYPE = "unknown";
54 public static final int DEFAULT_SHARD_BATCHED_MODIFICATION_COUNT = 1000;
55 public static final long DEFAULT_SHARD_COMMIT_QUEUE_EXPIRY_TIMEOUT_IN_MS =
56 TimeUnit.MILLISECONDS.convert(2, TimeUnit.MINUTES);
57 public static final int DEFAULT_SHARD_SNAPSHOT_CHUNK_SIZE = 2048000;
59 public static final long DEFAULT_SYNC_INDEX_THRESHOLD = 10;
61 private static final Set<String> GLOBAL_DATASTORE_NAMES = ConcurrentHashMap.newKeySet();
63 private final DefaultConfigParamsImpl raftConfig = new DefaultConfigParamsImpl();
65 private InMemoryDOMDataStoreConfigProperties dataStoreProperties;
66 private Duration shardTransactionIdleTimeout = DatastoreContext.DEFAULT_SHARD_TRANSACTION_IDLE_TIMEOUT;
67 private long operationTimeoutInMillis = DEFAULT_OPERATION_TIMEOUT_IN_MS;
68 private String dataStoreMXBeanType;
69 private int shardTransactionCommitTimeoutInSeconds = DEFAULT_SHARD_TX_COMMIT_TIMEOUT_IN_SECONDS;
70 private int shardTransactionCommitQueueCapacity = DEFAULT_SHARD_TX_COMMIT_QUEUE_CAPACITY;
71 private Timeout shardInitializationTimeout = DEFAULT_SHARD_INITIALIZATION_TIMEOUT;
72 private Timeout shardLeaderElectionTimeout = DEFAULT_SHARD_LEADER_ELECTION_TIMEOUT;
73 private boolean persistent = DEFAULT_PERSISTENT;
74 private AkkaConfigurationReader configurationReader = DEFAULT_CONFIGURATION_READER;
75 private long transactionCreationInitialRateLimit = DEFAULT_TX_CREATION_INITIAL_RATE_LIMIT;
76 private String dataStoreName = UNKNOWN_DATA_STORE_TYPE;
77 private LogicalDatastoreType logicalStoreType = LogicalDatastoreType.OPERATIONAL;
78 private YangInstanceIdentifier storeRoot = YangInstanceIdentifier.EMPTY;
79 private int shardBatchedModificationCount = DEFAULT_SHARD_BATCHED_MODIFICATION_COUNT;
80 private boolean writeOnlyTransactionOptimizationsEnabled = true;
81 private long shardCommitQueueExpiryTimeoutInMillis = DEFAULT_SHARD_COMMIT_QUEUE_EXPIRY_TIMEOUT_IN_MS;
82 private boolean useTellBasedProtocol = false;
83 private boolean transactionDebugContextEnabled = false;
84 private String shardManagerPersistenceId;
86 public static Set<String> getGlobalDatastoreNames() {
87 return GLOBAL_DATASTORE_NAMES;
90 private DatastoreContext() {
91 setShardJournalRecoveryLogBatchSize(DEFAULT_JOURNAL_RECOVERY_BATCH_SIZE);
92 setSnapshotBatchCount(DEFAULT_SNAPSHOT_BATCH_COUNT);
93 setHeartbeatInterval(DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS);
94 setIsolatedLeaderCheckInterval(DEFAULT_ISOLATED_LEADER_CHECK_INTERVAL_IN_MILLIS);
95 setSnapshotDataThresholdPercentage(DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD_PERCENTAGE);
96 setElectionTimeoutFactor(DEFAULT_SHARD_ELECTION_TIMEOUT_FACTOR);
97 setShardSnapshotChunkSize(DEFAULT_SHARD_SNAPSHOT_CHUNK_SIZE);
98 setSyncIndexThreshold(DEFAULT_SYNC_INDEX_THRESHOLD);
101 private DatastoreContext(final DatastoreContext other) {
102 this.dataStoreProperties = other.dataStoreProperties;
103 this.shardTransactionIdleTimeout = other.shardTransactionIdleTimeout;
104 this.operationTimeoutInMillis = other.operationTimeoutInMillis;
105 this.dataStoreMXBeanType = other.dataStoreMXBeanType;
106 this.shardTransactionCommitTimeoutInSeconds = other.shardTransactionCommitTimeoutInSeconds;
107 this.shardTransactionCommitQueueCapacity = other.shardTransactionCommitQueueCapacity;
108 this.shardInitializationTimeout = other.shardInitializationTimeout;
109 this.shardLeaderElectionTimeout = other.shardLeaderElectionTimeout;
110 this.persistent = other.persistent;
111 this.configurationReader = other.configurationReader;
112 this.transactionCreationInitialRateLimit = other.transactionCreationInitialRateLimit;
113 this.dataStoreName = other.dataStoreName;
114 this.logicalStoreType = other.logicalStoreType;
115 this.storeRoot = other.storeRoot;
116 this.shardBatchedModificationCount = other.shardBatchedModificationCount;
117 this.writeOnlyTransactionOptimizationsEnabled = other.writeOnlyTransactionOptimizationsEnabled;
118 this.shardCommitQueueExpiryTimeoutInMillis = other.shardCommitQueueExpiryTimeoutInMillis;
119 this.transactionDebugContextEnabled = other.transactionDebugContextEnabled;
120 this.shardManagerPersistenceId = other.shardManagerPersistenceId;
121 this.useTellBasedProtocol = other.useTellBasedProtocol;
123 setShardJournalRecoveryLogBatchSize(other.raftConfig.getJournalRecoveryLogBatchSize());
124 setSnapshotBatchCount(other.raftConfig.getSnapshotBatchCount());
125 setHeartbeatInterval(other.raftConfig.getHeartBeatInterval().toMillis());
126 setIsolatedLeaderCheckInterval(other.raftConfig.getIsolatedCheckIntervalInMillis());
127 setSnapshotDataThresholdPercentage(other.raftConfig.getSnapshotDataThresholdPercentage());
128 setElectionTimeoutFactor(other.raftConfig.getElectionTimeoutFactor());
129 setCustomRaftPolicyImplementation(other.raftConfig.getCustomRaftPolicyImplementationClass());
130 setShardSnapshotChunkSize(other.raftConfig.getSnapshotChunkSize());
131 setPeerAddressResolver(other.raftConfig.getPeerAddressResolver());
132 setTempFileDirectory(other.getTempFileDirectory());
133 setFileBackedStreamingThreshold(other.getFileBackedStreamingThreshold());
134 setSyncIndexThreshold(other.raftConfig.getSyncIndexThreshold());
137 public static Builder newBuilder() {
138 return new Builder(new DatastoreContext());
141 public static Builder newBuilderFrom(final DatastoreContext context) {
142 return new Builder(new DatastoreContext(context));
145 public InMemoryDOMDataStoreConfigProperties getDataStoreProperties() {
146 return dataStoreProperties;
149 public Duration getShardTransactionIdleTimeout() {
150 return shardTransactionIdleTimeout;
153 public String getDataStoreMXBeanType() {
154 return dataStoreMXBeanType;
157 public long getOperationTimeoutInMillis() {
158 return operationTimeoutInMillis;
161 public ConfigParams getShardRaftConfig() {
165 public int getShardTransactionCommitTimeoutInSeconds() {
166 return shardTransactionCommitTimeoutInSeconds;
169 public int getShardTransactionCommitQueueCapacity() {
170 return shardTransactionCommitQueueCapacity;
173 public Timeout getShardInitializationTimeout() {
174 return shardInitializationTimeout;
177 public Timeout getShardLeaderElectionTimeout() {
178 return shardLeaderElectionTimeout;
181 public boolean isPersistent() {
185 public AkkaConfigurationReader getConfigurationReader() {
186 return configurationReader;
189 public long getShardElectionTimeoutFactor() {
190 return raftConfig.getElectionTimeoutFactor();
193 public String getDataStoreName() {
194 return dataStoreName;
197 public LogicalDatastoreType getLogicalStoreType() {
198 return logicalStoreType;
201 public YangInstanceIdentifier getStoreRoot() {
205 public long getTransactionCreationInitialRateLimit() {
206 return transactionCreationInitialRateLimit;
209 public String getShardManagerPersistenceId() {
210 return shardManagerPersistenceId;
213 public String getTempFileDirectory() {
214 return raftConfig.getTempFileDirectory();
217 private void setTempFileDirectory(final String tempFileDirectory) {
218 raftConfig.setTempFileDirectory(tempFileDirectory);
221 public int getFileBackedStreamingThreshold() {
222 return raftConfig.getFileBackedStreamingThreshold();
225 private void setFileBackedStreamingThreshold(final int fileBackedStreamingThreshold) {
226 raftConfig.setFileBackedStreamingThreshold(fileBackedStreamingThreshold);
229 private void setPeerAddressResolver(final PeerAddressResolver resolver) {
230 raftConfig.setPeerAddressResolver(resolver);
233 private void setHeartbeatInterval(final long shardHeartbeatIntervalInMillis) {
234 raftConfig.setHeartBeatInterval(new FiniteDuration(shardHeartbeatIntervalInMillis,
235 TimeUnit.MILLISECONDS));
238 private void setShardJournalRecoveryLogBatchSize(final int shardJournalRecoveryLogBatchSize) {
239 raftConfig.setJournalRecoveryLogBatchSize(shardJournalRecoveryLogBatchSize);
243 private void setIsolatedLeaderCheckInterval(final long shardIsolatedLeaderCheckIntervalInMillis) {
244 raftConfig.setIsolatedLeaderCheckInterval(
245 new FiniteDuration(shardIsolatedLeaderCheckIntervalInMillis, TimeUnit.MILLISECONDS));
248 private void setElectionTimeoutFactor(final long shardElectionTimeoutFactor) {
249 raftConfig.setElectionTimeoutFactor(shardElectionTimeoutFactor);
252 private void setCustomRaftPolicyImplementation(final String customRaftPolicyImplementation) {
253 raftConfig.setCustomRaftPolicyImplementationClass(customRaftPolicyImplementation);
256 private void setSnapshotDataThresholdPercentage(final int shardSnapshotDataThresholdPercentage) {
257 Preconditions.checkArgument(shardSnapshotDataThresholdPercentage >= 0
258 && shardSnapshotDataThresholdPercentage <= 100);
259 raftConfig.setSnapshotDataThresholdPercentage(shardSnapshotDataThresholdPercentage);
262 private void setSnapshotBatchCount(final long shardSnapshotBatchCount) {
263 raftConfig.setSnapshotBatchCount(shardSnapshotBatchCount);
266 private void setShardSnapshotChunkSize(final int shardSnapshotChunkSize) {
267 raftConfig.setSnapshotChunkSize(shardSnapshotChunkSize);
270 private void setSyncIndexThreshold(final long syncIndexThreshold) {
271 raftConfig.setSyncIndexThreshold(syncIndexThreshold);
274 public int getShardBatchedModificationCount() {
275 return shardBatchedModificationCount;
278 public boolean isWriteOnlyTransactionOptimizationsEnabled() {
279 return writeOnlyTransactionOptimizationsEnabled;
282 public long getShardCommitQueueExpiryTimeoutInMillis() {
283 return shardCommitQueueExpiryTimeoutInMillis;
286 public boolean isTransactionDebugContextEnabled() {
287 return transactionDebugContextEnabled;
290 public boolean isUseTellBasedProtocol() {
291 return useTellBasedProtocol;
294 public int getShardSnapshotChunkSize() {
295 return raftConfig.getSnapshotChunkSize();
298 public static class Builder implements org.opendaylight.yangtools.concepts.Builder<DatastoreContext> {
299 private final DatastoreContext datastoreContext;
300 private int maxShardDataChangeExecutorPoolSize =
301 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE;
302 private int maxShardDataChangeExecutorQueueSize =
303 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE;
304 private int maxShardDataChangeListenerQueueSize =
305 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_LISTENER_QUEUE_SIZE;
306 private int maxShardDataStoreExecutorQueueSize =
307 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_STORE_EXECUTOR_QUEUE_SIZE;
309 private Builder(final DatastoreContext datastoreContext) {
310 this.datastoreContext = datastoreContext;
312 if (datastoreContext.getDataStoreProperties() != null) {
313 maxShardDataChangeExecutorPoolSize =
314 datastoreContext.getDataStoreProperties().getMaxDataChangeExecutorPoolSize();
315 maxShardDataChangeExecutorQueueSize =
316 datastoreContext.getDataStoreProperties().getMaxDataChangeExecutorQueueSize();
317 maxShardDataChangeListenerQueueSize =
318 datastoreContext.getDataStoreProperties().getMaxDataChangeListenerQueueSize();
319 maxShardDataStoreExecutorQueueSize =
320 datastoreContext.getDataStoreProperties().getMaxDataStoreExecutorQueueSize();
324 public Builder boundedMailboxCapacity(final int boundedMailboxCapacity) {
325 // TODO - this is defined in the yang DataStoreProperties but not currently used.
329 public Builder enableMetricCapture(final boolean enableMetricCapture) {
330 // TODO - this is defined in the yang DataStoreProperties but not currently used.
335 public Builder shardTransactionIdleTimeout(final long timeout, final TimeUnit unit) {
336 datastoreContext.shardTransactionIdleTimeout = Duration.create(timeout, unit);
340 public Builder shardTransactionIdleTimeoutInMinutes(final long timeout) {
341 return shardTransactionIdleTimeout(timeout, TimeUnit.MINUTES);
344 public Builder operationTimeoutInSeconds(final int operationTimeoutInSeconds) {
345 datastoreContext.operationTimeoutInMillis = TimeUnit.SECONDS.toMillis(operationTimeoutInSeconds);
349 public Builder operationTimeoutInMillis(final long operationTimeoutInMillis) {
350 datastoreContext.operationTimeoutInMillis = operationTimeoutInMillis;
354 public Builder dataStoreMXBeanType(final String dataStoreMXBeanType) {
355 datastoreContext.dataStoreMXBeanType = dataStoreMXBeanType;
359 public Builder shardTransactionCommitTimeoutInSeconds(final int shardTransactionCommitTimeoutInSeconds) {
360 datastoreContext.shardTransactionCommitTimeoutInSeconds = shardTransactionCommitTimeoutInSeconds;
364 public Builder shardJournalRecoveryLogBatchSize(final int shardJournalRecoveryLogBatchSize) {
365 datastoreContext.setShardJournalRecoveryLogBatchSize(shardJournalRecoveryLogBatchSize);
369 public Builder shardSnapshotBatchCount(final int shardSnapshotBatchCount) {
370 datastoreContext.setSnapshotBatchCount(shardSnapshotBatchCount);
374 public Builder shardSnapshotDataThresholdPercentage(final int shardSnapshotDataThresholdPercentage) {
375 datastoreContext.setSnapshotDataThresholdPercentage(shardSnapshotDataThresholdPercentage);
379 public Builder shardHeartbeatIntervalInMillis(final int shardHeartbeatIntervalInMillis) {
380 datastoreContext.setHeartbeatInterval(shardHeartbeatIntervalInMillis);
384 public Builder shardTransactionCommitQueueCapacity(final int shardTransactionCommitQueueCapacity) {
385 datastoreContext.shardTransactionCommitQueueCapacity = shardTransactionCommitQueueCapacity;
389 public Builder shardInitializationTimeout(final long timeout, final TimeUnit unit) {
390 datastoreContext.shardInitializationTimeout = new Timeout(timeout, unit);
394 public Builder shardInitializationTimeoutInSeconds(final long timeout) {
395 return shardInitializationTimeout(timeout, TimeUnit.SECONDS);
398 public Builder shardLeaderElectionTimeout(final long timeout, final TimeUnit unit) {
399 datastoreContext.shardLeaderElectionTimeout = new Timeout(timeout, unit);
403 public Builder shardLeaderElectionTimeoutInSeconds(final long timeout) {
404 return shardLeaderElectionTimeout(timeout, TimeUnit.SECONDS);
407 public Builder configurationReader(final AkkaConfigurationReader configurationReader) {
408 datastoreContext.configurationReader = configurationReader;
412 public Builder persistent(final boolean persistent) {
413 datastoreContext.persistent = persistent;
417 public Builder shardIsolatedLeaderCheckIntervalInMillis(final int shardIsolatedLeaderCheckIntervalInMillis) {
418 datastoreContext.setIsolatedLeaderCheckInterval(shardIsolatedLeaderCheckIntervalInMillis);
422 public Builder shardElectionTimeoutFactor(final long shardElectionTimeoutFactor) {
423 datastoreContext.setElectionTimeoutFactor(shardElectionTimeoutFactor);
427 public Builder transactionCreationInitialRateLimit(final long initialRateLimit) {
428 datastoreContext.transactionCreationInitialRateLimit = initialRateLimit;
432 public Builder logicalStoreType(final LogicalDatastoreType logicalStoreType) {
433 datastoreContext.logicalStoreType = Preconditions.checkNotNull(logicalStoreType);
435 // Retain compatible naming
436 switch (logicalStoreType) {
438 dataStoreName("config");
441 dataStoreName("operational");
444 dataStoreName(logicalStoreType.name());
450 public Builder storeRoot(final YangInstanceIdentifier storeRoot) {
451 datastoreContext.storeRoot = storeRoot;
455 public Builder dataStoreName(final String dataStoreName) {
456 datastoreContext.dataStoreName = Preconditions.checkNotNull(dataStoreName);
457 datastoreContext.dataStoreMXBeanType = "Distributed" + WordUtils.capitalize(dataStoreName) + "Datastore";
461 public Builder shardBatchedModificationCount(final int shardBatchedModificationCount) {
462 datastoreContext.shardBatchedModificationCount = shardBatchedModificationCount;
466 public Builder writeOnlyTransactionOptimizationsEnabled(final boolean value) {
467 datastoreContext.writeOnlyTransactionOptimizationsEnabled = value;
471 public Builder shardCommitQueueExpiryTimeoutInMillis(final long value) {
472 datastoreContext.shardCommitQueueExpiryTimeoutInMillis = value;
476 public Builder shardCommitQueueExpiryTimeoutInSeconds(final long value) {
477 datastoreContext.shardCommitQueueExpiryTimeoutInMillis = TimeUnit.MILLISECONDS.convert(
478 value, TimeUnit.SECONDS);
482 public Builder transactionDebugContextEnabled(final boolean value) {
483 datastoreContext.transactionDebugContextEnabled = value;
487 public Builder maxShardDataChangeExecutorPoolSize(final int maxShardDataChangeExecutorPoolSize) {
488 this.maxShardDataChangeExecutorPoolSize = maxShardDataChangeExecutorPoolSize;
492 public Builder maxShardDataChangeExecutorQueueSize(final int maxShardDataChangeExecutorQueueSize) {
493 this.maxShardDataChangeExecutorQueueSize = maxShardDataChangeExecutorQueueSize;
497 public Builder maxShardDataChangeListenerQueueSize(final int maxShardDataChangeListenerQueueSize) {
498 this.maxShardDataChangeListenerQueueSize = maxShardDataChangeListenerQueueSize;
502 public Builder maxShardDataStoreExecutorQueueSize(final int maxShardDataStoreExecutorQueueSize) {
503 this.maxShardDataStoreExecutorQueueSize = maxShardDataStoreExecutorQueueSize;
507 public Builder useTellBasedProtocol(final boolean value) {
508 datastoreContext.useTellBasedProtocol = value;
513 * For unit tests only.
516 public Builder shardManagerPersistenceId(final String id) {
517 datastoreContext.shardManagerPersistenceId = id;
521 public Builder customRaftPolicyImplementation(final String customRaftPolicyImplementation) {
522 datastoreContext.setCustomRaftPolicyImplementation(customRaftPolicyImplementation);
526 public Builder shardSnapshotChunkSize(final int shardSnapshotChunkSize) {
527 datastoreContext.setShardSnapshotChunkSize(shardSnapshotChunkSize);
531 public Builder shardPeerAddressResolver(final PeerAddressResolver resolver) {
532 datastoreContext.setPeerAddressResolver(resolver);
536 public Builder tempFileDirectory(final String tempFileDirectory) {
537 datastoreContext.setTempFileDirectory(tempFileDirectory);
541 public Builder fileBackedStreamingThresholdInMegabytes(final int fileBackedStreamingThreshold) {
542 datastoreContext.setFileBackedStreamingThreshold(fileBackedStreamingThreshold * ConfigParams.MEGABYTE);
546 public Builder syncIndexThreshold(final long syncIndexThreshold) {
547 datastoreContext.setSyncIndexThreshold(syncIndexThreshold);
552 public DatastoreContext build() {
553 datastoreContext.dataStoreProperties = InMemoryDOMDataStoreConfigProperties.create(
554 maxShardDataChangeExecutorPoolSize, maxShardDataChangeExecutorQueueSize,
555 maxShardDataChangeListenerQueueSize, maxShardDataStoreExecutorQueueSize);
557 if (datastoreContext.dataStoreName != null) {
558 GLOBAL_DATASTORE_NAMES.add(datastoreContext.dataStoreName);
561 return datastoreContext;