Skip to content

Closing a channel should cleanup recorded auto-delete queues #669

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

Merged
merged 3 commits into from
Feb 17, 2021
Merged

Closing a channel should cleanup recorded auto-delete queues #669

merged 3 commits into from
Feb 17, 2021

Conversation

vikinghawk
Copy link
Contributor

@vikinghawk vikinghawk commented Feb 16, 2021

Proposed Changes

Closing a channel should remove recorded auto-delete queues just like it does for explicitly canceling a consumer.

Types of Changes

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

  • Bugfix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance)

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.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

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.

@michaelklishin
Copy link
Contributor

CI reported a lot of failures like this:

04:35:02.605 [rabbitmq-connection-shutdown-amqp://[email protected]:5672/] ERROR c.r.c.impl.ForgivingExceptionHandler - Caught an exception when recovering topology Caught an exception while recovering consumer amq.ctag-z7lKh0mMzJkcQtj0Uw5elg: channel is already closed due to channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue '-2745730218113755' in vhost '/', class-id=60, method-id=20)
com.rabbitmq.client.TopologyRecoveryException: Caught an exception while recovering consumer amq.ctag-z7lKh0mMzJkcQtj0Uw5elg: channel is already closed due to channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue '-2745730218113755' in vhost '/', class-id=60, method-id=20)
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverConsumer(AutorecoveringConnection.java:821)
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverTopology(AutorecoveringConnection.java:681)
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.beginAutomaticRecovery(AutorecoveringConnection.java:583)
	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.lambda$addAutomaticRecoveryListener$3(AutorecoveringConnection.java:509)
	at com.rabbitmq.client.impl.AMQConnection.notifyRecoveryCanBeginListeners(AMQConnection.java:808)
	at com.rabbitmq.client.impl.AMQConnection.doFinalShutdown(AMQConnection.java:785)
	at com.rabbitmq.client.impl.nio.NioLoop.lambda$dispatchShutdownToConnection$2(NioLoop.java:305)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.rabbitmq.client.AlreadyClosedException: channel is already closed due to channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue '-2745730218113755' in vhost '/', class-id=60, method-id=20)

This can be due to our recent test suite changes as I'm running into an unrelated error in master.

@michaelklishin
Copy link
Contributor

michaelklishin commented Feb 16, 2021

[ERROR]   ConnectionRecovery>BrokerTestCase.tearDown:94->BrokerTestCase.closeChannel:171 » ConcurrentModification
[ERROR]   ConnectionRecovery.consumersAreRemovedFromConnectionWhenChannelIsClosed:792 » ConcurrentModification

are two failures specific to this branch.

@michaelklishin
Copy link
Contributor

I used

./mvnw verify -P '!setup-test-cluster',use-nio -Dtest-broker.A.nodename=rabbit@$(hostname -s) -Drabbitmqctl.bin=rabbitmqctl -Dit.test=ConnectionRecovery

to run the suite.

@acogoluegnes acogoluegnes merged commit ee8af1a into rabbitmq:master Feb 17, 2021
@acogoluegnes
Copy link
Contributor

Thanks!

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