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

mqbc::ClusterUtil: Revert to not populate appId infos in non-CSL mode #408

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 8 additions & 4 deletions src/groups/mqb/mqbc/mqbc_clusterutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,8 @@ void ClusterUtil::populateQueueAssignmentAdvisory(
ClusterState* clusterState,
ClusterData* clusterData,
const bmqt::Uri& uri,
const mqbi::Domain* domain)
const mqbi::Domain* domain,
bool isCSLMode)
{
// PRECONDITIONS
BSLS_ASSERT_SAFE(advisory);
Expand All @@ -809,8 +810,10 @@ void ClusterUtil::populateQueueAssignmentAdvisory(
uri.asString());
key->loadBinary(&queueInfo.key());

// Generate appIds and appKeys
populateAppIdInfos(&queueInfo.appIds(), domain->config().mode());
if (isCSLMode) {
// Generate appIds and appKeys
populateAppIdInfos(&queueInfo.appIds(), domain->config().mode());
}

BALL_LOG_INFO << clusterData->identity().description()
<< ": Populated QueueAssignmentAdvisory: " << *advisory;
Expand Down Expand Up @@ -1004,7 +1007,8 @@ ClusterUtil::assignQueue(ClusterState* clusterState,
clusterState,
clusterData,
uri,
domIt->second->domain());
domIt->second->domain(),
cluster->isCSLModeEnabled());
if (cluster->isCSLModeEnabled()) {
// In CSL mode, we delay the insertion to queueKeys until
// 'onQueueAssigned' observer callback.
Expand Down
6 changes: 4 additions & 2 deletions src/groups/mqb/mqbc/mqbc_clusterutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,16 @@ struct ClusterUtil {
/// Populate the specified `advisory` with information describing a
/// queue assignment of the specified `uri` living in the specified
/// `domain`, using the specified `clusterState`, `clusterData`. Load into
/// the specified `key` the unique queue key generated.
/// the specified `key` the unique queue key generated. AppIds info will
/// not be populated if the specified `isCSLMode` is true.
static void populateQueueAssignmentAdvisory(
bmqp_ctrlmsg::QueueAssignmentAdvisory* advisory,
mqbu::StorageKey* key,
ClusterState* clusterState,
ClusterData* clusterData,
const bmqt::Uri& uri,
const mqbi::Domain* domain);
const mqbi::Domain* domain,
bool isCSLMode);

/// Populate the specified `advisory` with information describing a
/// queue unassignment of the specified `uri` having the specified `key`
Expand Down
Loading