Skip to content

Commit 852e459

Browse files
committed
Allow QueueAssignmentAdvisory do CSL from the second part of LeaderAdvisory
Signed-off-by: Emelia Lei <[email protected]>
1 parent e3d18b9 commit 852e459

5 files changed

+14
-20
lines changed

Diff for: src/groups/mqb/mqbblp/mqbblp_clusterstatemanager.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,7 @@ void ClusterStateManager::processQueueAssignmentRequest(
14841484
void ClusterStateManager::processQueueAssignmentAdvisory(
14851485
const bmqp_ctrlmsg::ControlMessage& message,
14861486
mqbnet::ClusterNode* source,
1487-
bool delayed,
1488-
bool fromLeaderAdvisory)
1487+
bool delayed)
14891488
{
14901489
// executed by the cluster *DISPATCHER* thread
14911490

@@ -2161,8 +2160,7 @@ void ClusterStateManager::processLeaderAdvisory(
21612160

21622161
processQueueAssignmentAdvisory(controlMsg,
21632162
source,
2164-
false /* not delayed */,
2165-
true /* called from leaderAdvisory */);
2163+
false /* not delayed */);
21662164

21672165
// Leader status and sequence number are updated unconditionally. It may
21682166
// have been updated by one of the routines called earlier in this method,

Diff for: src/groups/mqb/mqbblp/mqbblp_clusterstatemanager.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -489,11 +489,10 @@ class ClusterStateManager BSLS_KEYWORD_FINAL
489489
/// TODO_CSL: This is the current workflow which we should be able to
490490
/// remove after the new workflow via
491491
/// ClusterQueueHelper::onQueueAssigned() is stable.
492-
void processQueueAssignmentAdvisory(
493-
const bmqp_ctrlmsg::ControlMessage& message,
494-
mqbnet::ClusterNode* source,
495-
bool delayed = false,
496-
bool fromLeaderAdvisory = false) BSLS_KEYWORD_OVERRIDE;
492+
void
493+
processQueueAssignmentAdvisory(const bmqp_ctrlmsg::ControlMessage& message,
494+
mqbnet::ClusterNode* source,
495+
bool delayed = false) BSLS_KEYWORD_OVERRIDE;
497496

498497
/// Process the queue unAssigned advisory in the specified `message`
499498
/// received from the specified `source`.

Diff for: src/groups/mqb/mqbc/mqbc_clusterstatemanager.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1784,8 +1784,7 @@ void ClusterStateManager::processQueueAssignmentRequest(
17841784
void ClusterStateManager::processQueueAssignmentAdvisory(
17851785
BSLS_ANNOTATION_UNUSED const bmqp_ctrlmsg::ControlMessage& message,
17861786
BSLS_ANNOTATION_UNUSED mqbnet::ClusterNode* source,
1787-
BSLS_ANNOTATION_UNUSED bool delayed,
1788-
BSLS_ANNOTATION_UNUSED bool fromLeaderAdvisory)
1787+
BSLS_ANNOTATION_UNUSED bool delayed)
17891788
{
17901789
BSLS_ASSERT_SAFE(false &&
17911790
"This method should only be invoked in non-CSL mode");

Diff for: src/groups/mqb/mqbc/mqbc_clusterstatemanager.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,10 @@ class ClusterStateManager BSLS_KEYWORD_FINAL
589589
/// TODO_CSL: This is the current workflow which we should be able to
590590
/// remove after the new workflow via
591591
/// ClusterQueueHelper::onQueueAssigned() is stable.
592-
void processQueueAssignmentAdvisory(
593-
const bmqp_ctrlmsg::ControlMessage& message,
594-
mqbnet::ClusterNode* source,
595-
bool delayed = false,
596-
bool fromLeaderAdvisory = false) BSLS_KEYWORD_OVERRIDE;
592+
void
593+
processQueueAssignmentAdvisory(const bmqp_ctrlmsg::ControlMessage& message,
594+
mqbnet::ClusterNode* source,
595+
bool delayed = false) BSLS_KEYWORD_OVERRIDE;
597596

598597
/// Process the queue unAssigned advisory in the specified `message`
599598
/// received from the specified `source`.

Diff for: src/groups/mqb/mqbi/mqbi_clusterstatemanager.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ class ClusterStateManager {
8686
AfterPartitionPrimaryAssignmentCb;
8787

8888
/// Pair of (appId, appKey)
89-
typedef bsl::pair<bsl::string, mqbu::StorageKey> AppInfo;
89+
typedef bsl::pair<bsl::string, mqbu::StorageKey> AppInfo;
9090
typedef bsl::unordered_map<bsl::string, mqbu::StorageKey> AppInfos;
91-
typedef AppInfos::const_iterator AppInfosCIter;
91+
typedef AppInfos::const_iterator AppInfosCIter;
9292

9393
struct QueueAssignmentResult {
9494
enum Enum {
@@ -336,8 +336,7 @@ class ClusterStateManager {
336336
virtual void
337337
processQueueAssignmentAdvisory(const bmqp_ctrlmsg::ControlMessage& message,
338338
mqbnet::ClusterNode* source,
339-
bool delayed = false,
340-
bool fromLeaderAdvisory = false) = 0;
339+
bool delayed = false) = 0;
341340

342341
/// Process the queue unAssigned advisory in the specified `message`
343342
/// received from the specified `source`.

0 commit comments

Comments
 (0)