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

Fix rabbit_stream_queue:get_counters querying writer last #8269

Merged
merged 2 commits into from
May 23, 2023

Conversation

gomoripeti
Copy link
Contributor

Proposed Changes

rabbit_steam_coordinator:stream_overview/1 returns the member in
different format than members/1, resulting in is_writer/1 never
matching. This was changed in PR #6440. This prevents getting counters
from stream writer last as intended by PR #6442.

Tracing while calling rabbitmq-queues stream_status sq1

> recon_trace:calls({rabbit_stream_queue, is_writer, return_trace}, 20,[{scope,local}]).
1

23:42:05.259202 <0.21224.0> rabbit_stream_queue:is_writer(#{state=>{running,1,<0.1735.0>}, current=>undefined, role=>{writer,1}, target=>running})

23:42:05.259621 <0.21224.0> rabbit_stream_queue:is_writer/1 --> false
...

Let me know if the change from members/1 to stream_overview/1 was intentional and I can rework this change.

#6440 was only included in 3.12. (This is not a big issue but) this change makes a followup PR of mine easier to be applied to both 3.12 and 3.10/3.11.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

Further Comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc.

`rabbit_steam_coordinator:stream_overview/1` returns the member in
different format than `members/1`, resulting in `is_writer/1` never
matching. This was changed in PR rabbitmq#6440. This prevents getting counters
from stream writer last as intended by PR rabbitmq#6442.
Copy link
Contributor

@kjnilsson kjnilsson left a comment

Choose a reason for hiding this comment

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

LGTM!

@michaelklishin michaelklishin added this to the 3.12.0 milestone May 23, 2023
@michaelklishin michaelklishin merged commit e9e2178 into rabbitmq:main May 23, 2023
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.

3 participants