Migration from persistent shard coordinator to ddata with eventsource… (#29058)

* Migration from persistent shard coordinator to ddata with eventsourced remembered entities

* Fix bin compat in typed sharding

* Add log capturing

* Java API for nested case objects in typed sharding settings

* Starting some docs for remembering entities store

* Snapshot and marker to detect going back to persistence mode

* Review feedback

* Unused imports
This commit is contained in:
Christopher Batey 2020-05-13 10:38:11 +01:00 committed by GitHub
parent 6f8f44b3df
commit dba6eec460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1281 additions and 51 deletions

View file

@ -90,6 +90,7 @@ object ClusterShardingSettings {
journalPluginId = config.getString("journal-plugin-id"),
snapshotPluginId = config.getString("snapshot-plugin-id"),
stateStoreMode = config.getString("state-store-mode"),
rememberEntitiesStore = config.getString("remember-entities-store"),
passivateIdleEntityAfter = passivateIdleAfter,
shardRegionQueryTimeout = config.getDuration("shard-region-query-timeout", MILLISECONDS).millis,
tuningParameters,
@ -238,6 +239,7 @@ final class ClusterShardingSettings(
val journalPluginId: String,
val snapshotPluginId: String,
val stateStoreMode: String,
val rememberEntitiesStore: String,
val passivateIdleEntityAfter: FiniteDuration,
val shardRegionQueryTimeout: FiniteDuration,
val tuningParameters: ClusterShardingSettings.TuningParameters,
@ -245,6 +247,34 @@ final class ClusterShardingSettings(
val leaseSettings: Option[LeaseUsageSettings])
extends NoSerializationVerificationNeeded {
@deprecated(
"Use the ClusterShardingSettings factory methods or the constructor including rememberedEntitiesStoreinstead",
"2.6.6" // TODO update once merged
)
def this(
role: Option[String],
rememberEntities: Boolean,
journalPluginId: String,
snapshotPluginId: String,
stateStoreMode: String,
passivateIdleEntityAfter: FiniteDuration,
shardRegionQueryTimeout: FiniteDuration,
tuningParameters: ClusterShardingSettings.TuningParameters,
coordinatorSingletonSettings: ClusterSingletonManagerSettings,
leaseSettings: Option[LeaseUsageSettings]) =
this(
role,
rememberEntities,
journalPluginId,
snapshotPluginId,
stateStoreMode,
"ddata",
passivateIdleEntityAfter,
shardRegionQueryTimeout,
tuningParameters,
coordinatorSingletonSettings,
leaseSettings)
// bin compat for 2.5.23
@deprecated(
"Use the ClusterShardingSettings factory methods or the constructor including shardRegionQueryTimeout instead",
@ -269,7 +299,7 @@ final class ClusterShardingSettings(
3.seconds,
tuningParameters,
coordinatorSingletonSettings,
None)
leaseSettings)
// bin compat for 2.5.21
@deprecated(
@ -392,6 +422,7 @@ final class ClusterShardingSettings(
journalPluginId,
snapshotPluginId,
stateStoreMode,
rememberEntitiesStore,
passivateIdleAfter,
shardRegionQueryTimeout,
tuningParameters,