Skip to content

Fix[mqb]: handle same queueId + different URI openQueue - #1662

Open
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:260728_same_qId_different_uri
Open

Fix[mqb]: handle same queueId + different URI openQueue#1662
678098 wants to merge 1 commit into
bloomberg:mainfrom
678098:260728_same_qId_different_uri

Conversation

@678098

@678098 678098 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Gracefully handle the case when we have 2 open queue requests with the same queueId and different URIs.

The newly added UT fails on main

TEST /home/runner/work/blazingmq/blazingmq/src/groups/mqb/mqba/mqba_clientsession.t.cpp CASE 12
Error /home/runner/work/blazingmq/blazingmq/src/groups/mqb/mqbblp/mqbblp_queuesessionmanager.cpp(304): queueHandle == ins.first->second.d_handle_p    (failed)
terminate called after throwing an instance of 'BloombergLP::bsls::AssertTestException'

The logs on the broker:

28JUL2026_20:34:53.607 (6165393408) ERROR mqbblp_queuesessionmanager.cpp:300 #CLIENT_IMPROPER_BEHAVIOR fuzztest:0: Rejecting openQueue: queueId [ qId = 1 subId = DEFAULT ] is already in use for a different queue [uri: 'bmq://bmq.test.mem.priority/second-queue'].
28JUL2026_20:34:53.607 (6165393408) WARN mqba_clientsession.cpp:1177 #CLIENT_OPENQUEUE_FAILURE fuzztest:0: Error while opening queue: [reason: [ category = E_INVALID_ARGUMENT code = -1 message = "queueId is already in use for a different queue" ], request: [ rId = 7 choice = [ openQueue = [ handleParameters = [ uri = "bmq://bmq.test.mem.priority/second-queue" qId = 1 subIdInfo = [ subId = 0 appId = "__default" ] flags = 6 readCount = 1 writeCount = 1 adminCount = 0 ] ] ] ]]
28JUL2026_20:34:53.607 (6165393408) INFO mqba_clientsession.cpp:1200 fuzztest:0: Sending openQueue response: [ rId = 7 choice = [ status = [ category = E_INVALID_ARGUMENT code = -1 message = "queueId is already in use for a different queue" ] ] ] for request: [ rId = 7 choice = [ openQueue = [ handleParameters = [ uri = "bmq://bmq.test.mem.priority/second-queue" qId = 1 subIdInfo = [ subId = 0 appId = "__default" ] flags = 6 readCount = 1 writeCount = 1 adminCount = 0 ] ] ] ]
28JUL2026_20:34:53.607 (6165393408) INFO bmqu_operationlogger.h:201 fuzztest:0: open queue [queue: 'bmq://bmq.test.mem.priority/second-queue'] took: 2.20 ms (2195459 nanoseconds)
28JUL2026_20:34:53.607 (6165393408) ERROR mqbblp_clusterqueuehelper.cpp:2062 [THROTTLED] Cluster (local): OpenQueueConfirmationCookie released without successful processing from the requester. Queue handle  ptr [0xa66400e10], client ptr [0xa671e2818], handle parameters: [ uri = "bmq://bmq.test.mem.priority/second-queue" qId = 1 subIdInfo = [ subId = 0 appId = "__default" ] flags = 6 readCount = 1 writeCount = 1 adminCount = 0 ].

@678098
678098 requested a review from a team as a code owner July 28, 2026 20:47
Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
@678098
678098 force-pushed the 260728_same_qId_different_uri branch from a8eaeea to ae5cb8f Compare July 28, 2026 21:17
@678098 678098 changed the title UT[mqba] Fix[mqb]: handle same queueId + different URI openQueue Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant