rabbitmq-server
rabbitmq-server copied to clipboard
Quorum queue replica Erlang process names can conflict between queues in different virtual hosts
Describe the bug
The internal QQ process names are of the form vhost_queue. This could cause issues when vhost and queue names contain underscores.
Reproduction steps
- Create a 3.13.0 broker.
- Create 2 vhosts called "foo" and "foo_bar"
- On vhost "foo", create a QQ called "bar_baz"
- On vhost "foo_bar", create a QQ called "baz"
- Observe the following error:
Expected behavior
User can successfully create both QQs.
Additional context
No response
No matter what separator you pick, there will be a risk of such conflict. OTP system processes often use dollar signs for separators.
It's a good question what version a change like this can ship it. But given that these are process names, not replica identities (those are pairs), possibly this can go into 3.13.x.
@tvhong-amazon it turns out, there is an alternative strategy that's used already but only for names that are longer than 255 bytes long.
And this value is persisted as part of replica state.
So what can be done to avoid is
- Use the current strategy
- If the concatenated process name is longer than 255 bytes or we run into certain exceptions, use an alternative strategy