Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Sep 12, 2025

This commit makes read operations for the following Khepri projections much cheaper:

  • rabbit_khepri_queue
  • rabbit_khepri_exchange
  • rabbit_khepri_index_route
  • rabbit_khepri_topic_trie

Entries in these ETS tables are read for every message entering RabbitMQ. Some messages entering RabbitMQ will cause even multiple reads from these ETS tables, e.g. multiple reads from rabbit_khepri_queue if a message is routed to more than one queue or multiple reads from rabbit_khepri_index_route if a message has multiple routing keys.

On a busy RabbitMQ node, these tables are read concurrently (on multiple physical processors) hundreds of thousands of times per second.


This is an automatic backport of pull request #14530 done by Mergify.

This commit makes read operations for the following Khepri projections much cheaper:
* rabbit_khepri_queue
* rabbit_khepri_exchange
* rabbit_khepri_index_route
* rabbit_khepri_topic_trie

Entries in these ETS tables are read for every message entering RabbitMQ.
Some messages entering RabbitMQ will cause even multiple reads from
these ETS tables, e.g. multiple reads from `rabbit_khepri_queue` if a message
is routed to more than one queue or multiple reads from `rabbit_khepri_index_route`
if a message has multiple routing keys.

On a busy RabbitMQ node, these tables are read concurrently (on multiple physical processors)
hundreds of thousands of times per second.

(cherry picked from commit d29cac3)
@mergify mergify bot assigned ansd Sep 12, 2025
@michaelklishin michaelklishin added this to the 4.2.0 milestone Sep 12, 2025
@michaelklishin michaelklishin merged commit ae02188 into v4.2.x Sep 12, 2025
287 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.2.x/pr-14530 branch September 12, 2025 19:49
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