# the "shard-election-timeout-factor" property would be applied to both data stores whereas specifying
# "operational.shard-election-timeout-factor" would only apply to the "operational" data store. Similarly,
# specifying "config.shard-election-timeout-factor" would only apply to the "config" data store.
+# Overall flexibility goes even further, as these overrides can also be combined with per-shard specification,
+# so that you can also use:
+# <shard-name>.<setting>
+# <datastore-name>.<shard-name>.<setting>
+# for example:
+# topology.shard-election-timeout-factor=2 # override both config/operational for topology shard
+# config.topology.shard-election-timeout-factor=5 # override config for topology shard
+# operational.topology.shard-election-timeout-factor=7 # override operational for topology shard
+#
# The multiplication factor to be used to determine shard election timeout. The shard election timeout
# is determined by multiplying shardHeartbeatIntervalInMillis with the shardElectionTimeoutFactor.
properties.put("operational.shard-transaction-idle-timeout-in-minutes", "33"); // operational override
properties.put("config.shard-transaction-idle-timeout-in-minutes", "44"); // config override
properties.put("topology.shard-transaction-idle-timeout-in-minutes", "55"); // global shard override
+ properties.put("config.topology.persistent", "false"); // per-shard config override
final DatastoreContextIntrospector operIntrospector = INTROSPECTOR_FACTORY.newInstance(OPERATIONAL);
shardContext = configIntrospector.newContextFactory().getShardDatastoreContext("topology");
assertEquals(55, shardContext.getShardTransactionIdleTimeout().toMinutes());
+ assertFalse(shardContext.isPersistent());
// operational shard override
properties.put("operational.topology.shard-transaction-idle-timeout-in-minutes", "66");
shardContext = configIntrospector.newContextFactory().getShardDatastoreContext("default");
assertEquals(44, shardContext.getShardTransactionIdleTimeout().toMinutes());
+ assertTrue(shardContext.isPersistent());
}
}