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

Close #10543. Add If-Unused and If-Empty support for delete_queue for QQs #10711

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ikavgo
Copy link
Contributor

@ikavgo ikavgo commented Mar 11, 2024

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

Couldn't find any test suite for this. Tested manually.

Copy link
Member

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

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

We should have some tests for these two (three, four) new combinations of queue.delete parameters.

@ikavgo
Copy link
Contributor Author

ikavgo commented Mar 11, 2024

Agree, did I miss existing tests though?

@ikavgo ikavgo force-pushed the ik-10543-if-empty-if-unused-for-qqs branch from 1e972bb to b3d3ca7 Compare March 11, 2024 11:59
@michaelklishin
Copy link
Member

michaelklishin commented Mar 12, 2024

{ok, ReadyMsgs, Consumers} = stat(Q),
IsEmpty = ReadyMsgs == 0,
IsUnused = Consumers == 0,
if IfEmpty and not(IsEmpty) -> {error, not_empty};
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to line up bits of code like that. Please only use a single white space between things.
If you want the start of clauses to line up in columns use newlines.

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.

4 participants