Skip to content

Fix[mqb]: removing e_NO_HANDLE_STREAM_PRODUCERS - #1817

Merged
dorjesinpo merged 1 commit into
mainfrom
fix/no-stream-producers
Oct 20, 2026
Merged

dorjesinpo merged 1 commit into
mainfrom
fix/no-stream-producers

Conversation

@dorjesinpo

Copy link
Copy Markdown
Contributor

bugfix: removing last fanout app consumer erroneously clears RemoteQueue::d_pendingMessages.

The code mistakenly seeks symmetry supporting both e_NO_QUEUE_STREAM_CONSUMERS and e_NO_QUEUE_STREAM_PRODUCERS while producers are per queue and not per stream.

Making the QueueHandleReleaseResult level-triggered.

@dorjesinpo
dorjesinpo requested a review from a team as a code owner October 14, 2026 19:44
@dorjesinpo dorjesinpo added the bug Something isn't working label Oct 14, 2026
@dorjesinpo dorjesinpo changed the title removing e_NO_HANDLE_STREAM_PRODUCERS Fix[mqb]: removing e_NO_HANDLE_STREAM_PRODUCERS Oct 14, 2026
@dorjesinpo
dorjesinpo requested a review from 678098 October 19, 2026 18:35
Comment thread src/groups/mqb/mqbi/mqbi_queue.cpp Outdated
Comment on lines +35 to +36
<< (rhs.isHandleStreamEmpty() ? " isHandleStreamEmpty" : "")
<< (rhs.isQueueStreamEmpty() ? " isQueueStreamEmpty" : "")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two look more like a question is smth?
Maybe it is better to name it like queueStreamIsEmpty and handleStreamIsEmpty
Or handleStream: empty and queueStream: empty

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amended

/// Return true if there are no consumers and producers for this
/// subStream for all handles in this queue.
/// Return true if there are no clients for this subStream for all
/// handles in this queue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it confusing that a handle knows something about all other handles. Can this information become false by manipulating other handles? Can we avoid storing it at all on this level?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does come not from a handle but from a QueueEngine. As a result of (handle initiated) action.
The result is not cached, it is a return value of the operation.

@678098 678098 assigned dorjesinpo and unassigned 678098 Oct 19, 2026
Signed-off-by: dorjesinpo <129227380+dorjesinpo@users.noreply.github.com>
@dorjesinpo
dorjesinpo force-pushed the fix/no-stream-producers branch from 21112d8 to da02892 Compare October 20, 2026 14:34
@dorjesinpo dorjesinpo assigned 678098 and unassigned dorjesinpo Oct 20, 2026

@678098 678098 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@678098 678098 assigned dorjesinpo and unassigned 678098 Oct 20, 2026
@dorjesinpo
dorjesinpo merged commit 6602135 into main Oct 20, 2026
57 of 58 checks passed
@dorjesinpo
dorjesinpo deleted the fix/no-stream-producers branch October 20, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants