- Notifications
You must be signed in to change notification settings - Fork 4k
Use pg_local to track AMQP 1.0 connections #9374
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
Conversation
a828859 to c5b29f0 Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is pg_local moved to rabbit_common?
rabbit_common is for code common between rabbit and AMQP 0.9.1 client.
c5b29f0 to fb57043 Compare
Did we change the "rules" when it comes to sharing code between sub-projects in The |
That's the opposite: plugins must depend on There are still many circular dependency problems around As |
fb57043 to 0565ab0 Compare 141a184 to 85b95d2 Compare 85b95d2 to a9bf852 Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.)
I like the idea of using a separate process group for AMQP 1.0 connections. We likely need such a process group for Native AMQP anyway.
However, I would prefer to use local only pg as done for Native MQTT instead of pg_local. pg_local becomes a bottleneck as shown in https://github.com/rabbitmq/mqtt-testing/tree/79329012092f9b77f3663086a590b4631cb812a9/one-to-one#mass-client-disconnection
However, I could also to this changes as part of #9022. I don't think scalability matters much for non-native AMQP as shown by the supervisor:which_children/1 calls prior to this PR.
2.)
Closing the connection via the management UI shows inconsistencies in the AMQP 1.0 connections.
To repro:
- Create an AMQP 1.0 connection.
- You will see that connection the Management UI
Force Closethat connection from the Management UI.- The Management UI will not show the connection.
- However,
rabbitmqctl list_amqp10_connectionswill still show the connection.
From my point of view, this bug is acceptable for now, I'll fix it for 4.0 as part of #9022
93f002b to 3100d77 Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing.
99d07b0 to 695044f Compare | Looks like the bazel test //deps/rabbitmq_amqp1_0:proxy_protocol_SUITEfailures are consistent. |
| @michaelklishin I'm working on it! |
e44ae30 to caacf46 Compare | @ansd @michaelklishin this should be good to go after the next CI round. |
Fixes #9371 Since each AMQP 1.0 connection opens several direct AMQP connections, we must assign each direct connection a unique name to prevent multiple entries in the `connection_created_stats` table. Also, use `pg_local` to track AMQP 1.0 connections instead of walking the supervisor trees. Nuke authz_backends from connection created event 💥 Fix regex for connection name because UniqueId is part of it now (channel number)
caacf46 to c94d22a Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expanding the list of columns we return for AMQP 1.0 connections would be very nice but this (avoiding crashes and querying supervisors for children) is definitely an improvement as is.
Use pg_local to track AMQP 1.0 connections (backport #9374)
Fixes #9371
Since each AMQP 1.0 connection opens several direct AMQP connections, we
must assign each direct connection a unique name to prevent multiple
entries in the
connection_created_statstable.Also, use
pg_localto track AMQP 1.0 connections instead of walkingthe supervisor trees.