Skip to content

Commit b6028b2

Browse files
authored
Fix[MQB]: handle subsequent queue assignment failure (#930)
Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com>
1 parent 5cec08d commit b6028b2

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/groups/mqb/mqbblp/mqbblp_clusterqueuehelper.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,18 @@ void ClusterQueueHelper::onQueueAssignmentResponse(
610610
else if (status.code() == mqbi::ClusterErrorCode::e_LIMIT ||
611611
status.code() == mqbi::ClusterErrorCode::e_CSL_FAILURE ||
612612
status.code() == mqbi::ClusterErrorCode::e_UNKNOWN) {
613+
// Second openQueue for unassigned queue can result in second
614+
// QueueAssignmentRequest, so this can be the second response
615+
// after queue is already erased (upon the first response).
616+
// Note that the first QueueAssignmentResponse does responds to
617+
// the second openQueue request (see d_liveQInfo.d_pending).
618+
613619
QueueContextMapIter qit = d_queues.find(uri);
614-
BSLS_ASSERT_SAFE(qit != d_queues.end());
615-
const QueueContext* rejected = qit->second.get();
620+
if (qit != d_queues.end()) {
621+
const QueueContext* rejected = qit->second.get();
616622

617-
processRejectedQueueAssignment(rejected, status);
623+
processRejectedQueueAssignment(rejected, status);
624+
}
618625
}
619626
}
620627
else {

0 commit comments

Comments
 (0)