diff --git a/pkg/settings/cresettings/README.md b/pkg/settings/cresettings/README.md index 87120257d2..d7f84ce6ae 100644 --- a/pkg/settings/cresettings/README.md +++ b/pkg/settings/cresettings/README.md @@ -109,6 +109,7 @@ flowchart subgraph syncer.tryEngineCreate CoordinatedEngineEnabled[/CoordinatedEngineEnabled\]:::gate + ShardingFailoverEnabled[/ShardingFailoverEnabled\]:::gate end subgraph Engine.init diff --git a/pkg/settings/cresettings/defaults.json b/pkg/settings/cresettings/defaults.json index e047845f2e..83476970f5 100644 --- a/pkg/settings/cresettings/defaults.json +++ b/pkg/settings/cresettings/defaults.json @@ -7,6 +7,7 @@ "CentralizedWorkflowOwnerVerificationEnabled": "false", "RemoteExecutableWorkflowDONBindingEnabled": "false", "CoordinatedEngineEnabled": "false", + "ShardingFailoverEnabled": "false", "TenantID": "0", "VaultOrgIdAsSecretOwnerEnabled": "false", "PropagateOrgIDInRequestMetadata": "false", diff --git a/pkg/settings/cresettings/defaults.toml b/pkg/settings/cresettings/defaults.toml index 7311ee04e6..ce84fa128f 100644 --- a/pkg/settings/cresettings/defaults.toml +++ b/pkg/settings/cresettings/defaults.toml @@ -6,6 +6,7 @@ VaultJWTAuthEnabled = 'false' CentralizedWorkflowOwnerVerificationEnabled = 'false' RemoteExecutableWorkflowDONBindingEnabled = 'false' CoordinatedEngineEnabled = 'false' +ShardingFailoverEnabled = 'false' TenantID = '0' VaultOrgIdAsSecretOwnerEnabled = 'false' PropagateOrgIDInRequestMetadata = 'false' diff --git a/pkg/settings/cresettings/settings.go b/pkg/settings/cresettings/settings.go index 458253b058..06301d40a6 100644 --- a/pkg/settings/cresettings/settings.go +++ b/pkg/settings/cresettings/settings.go @@ -61,6 +61,7 @@ var Default = Schema{ CentralizedWorkflowOwnerVerificationEnabled: Bool(false), RemoteExecutableWorkflowDONBindingEnabled: Bool(false), CoordinatedEngineEnabled: Bool(false), + ShardingFailoverEnabled: Bool(false), TenantID: Uint64(0), // Deprecated: retained for backwards compatibility; workflow owner identifies secret ownership. VaultOrgIdAsSecretOwnerEnabled: Bool(false), @@ -386,7 +387,12 @@ type Schema struct { RemoteExecutableWorkflowDONBindingEnabled Setting[bool] // CoordinatedEngineEnabled selects the coordinated engine over the legacy // trigger-owning Engine for newly created workflows. - CoordinatedEngineEnabled Setting[bool] + CoordinatedEngineEnabled Setting[bool] + // ShardingFailoverEnabled, when true, makes a sharded workflow DON cache + // trigger events for workflows owned by another shard (instead of dropping + // them) so it can take over execution if the owning shard fails. Only + // applies when sharding is enabled on the node. + ShardingFailoverEnabled Setting[bool] TenantID Setting[uint64] VaultOrgIdAsSecretOwnerEnabled Setting[bool] // Deprecated PropagateOrgIDInRequestMetadata Setting[bool]