Skip to content

Commit

Permalink
mqbblp::ClusterCatalog: Check incompatibility between CSL and FSM mod…
Browse files Browse the repository at this point in the history
…es (#421)

Signed-off-by: Yuan Jing Vincent Yan <yyan82@bloomberg.net>
  • Loading branch information
kaikulimu authored Sep 19, 2024
1 parent 6044740 commit 44b4360
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/groups/mqb/mqbblp/mqbblp_clustercatalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ 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.";
return (rc * 10) + rc_FETCH_DEFINITION_FAILED; // RETURN
}

// 2. Create the mqbnet::Cluster
rc = createNetCluster(errorDescription,
Expand Down
3 changes: 3 additions & 0 deletions src/groups/mqb/mqbmock/mqbmock_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ void Cluster::_initializeClusterDefinition(
BSLS_ASSERT_OPT(!d_isStarted &&
"_initializeClusterDefinition() must be called before"
" start()");
if (isFSMWorkflow) {
BSLS_ASSERT_SAFE(isCSLMode);
}

d_clusterDefinition.name() = name;

Expand Down

0 comments on commit 44b4360

Please sign in to comment.