Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix[python]: default set together CSL and FSM flags #566

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/groups/mqb/mqbblp/mqbblp_clustercatalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,16 @@ int ClusterCatalog::createCluster(bsl::ostream& errorDescription,
// 1. Fetch the cluster definition
const mqbcfg::ClusterDefinition& clusterDefinition =
*clusterDefinitionIter;
if (clusterDefinition.clusterAttributes().isFSMWorkflow() &&
!clusterDefinition.clusterAttributes().isCSLModeEnabled()) {
errorDescription << "Cluster ('" << name
<< "') has incompatible CSL and FSM modes, not "
"creating cluster.";
if (clusterDefinition.clusterAttributes().isFSMWorkflow() !=
clusterDefinition.clusterAttributes().isCSLModeEnabled()) {
// CSL and FSM must be both true or both false, other combinations
// are not supported
errorDescription
<< "Cluster ('" << name << "') has incompatible CSL ("
<< clusterDefinition.clusterAttributes().isCSLModeEnabled()
<< ") and FSM ("
<< clusterDefinition.clusterAttributes().isFSMWorkflow()
<< ") modes, not creating cluster.";
return (rc * 10) + rc_FETCH_DEFINITION_FAILED; // RETURN
}

Expand Down
2 changes: 1 addition & 1 deletion src/python/blazingmq/dev/configurator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def _cluster_definition_partial_prototype(partition_config: mqbcfg.PartitionConf
ack_window_size=500,
),
cluster_attributes=mqbcfg.ClusterAttributes(
is_cslmode_enabled=True, is_fsmworkflow=False
is_cslmode_enabled=True, is_fsmworkflow=True
),
cluster_monitor_config=mqbcfg.ClusterMonitorConfig(
max_time_leader=15,
Expand Down
Loading