Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

(to be written)#14902

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
dumbbell wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromremove-delete-queue-transaction
Draft

Conversation

@dumbbell
Copy link
Collaborator

(to be written; CI doesn’t run on a commit without an explicit pull request…)

@dumbbelldumbbell self-assigned thisNov 5, 2025
@mergifymergifybot added the make labelNov 5, 2025
... by using `keep_while` conditions on bindings and auto-deleteexchanges.[Why]The `delete_queue` transaction's anonymous function has to be beextracted by Horus, like any Khepri transaction. This is an expensiveoperation, but Horus uses caching to avoid most work after the firstextraction.The problem is when there are many concurrent executions of the sametransaction, before it has been executed once: the cache is not hot andHorus has to extract the same transaction many times in parallelcurrently.An example of this situation is when there are massive disconnectionsfrom RabbitMQ clients that trigger massive queue deletions. This can puta lot of load on RabbitMQ.[How]This patch removes the entire transaction. Instead, it uses `keep_while`conditions on bindings and auto-delete exchanges to let Khepri handlethe deletion of semantically related tree nodes. RabbitMQ just has tomake a simle "delete this queue" command.
@dumbbelldumbbellforce-pushed theremove-delete-queue-transaction branch from082e24d to3a75b6cCompareNovember 6, 2025 21:24
@the-mikedavis
Copy link
Collaborator

I was looking into eliminating the transaction for queue deletion a while back but I didn't get the changes over the finish line. I just pushed up the branch I was working on:https://github.com/rabbitmq/rabbitmq-server/tree/md/khepri-q-delete-command. It's quite old but maybe it has some interesting leads for this branch. I also looked into using stored procedures where we use transactions now - wouldn't help us with the BEAM file changes in OTP 28 but it avoided some performance impacts. The code-server work for transactions is expensive but also the size of transaction commands can be quite large (the compiled module binary + env) and we could do a lot less work with commands + keep-while conditions. But, if I am remembering correctly, we would need some sort of migration for existing Khepri DBs to transition from transactions to keep-while and regular commands so that they could add the keep-while conditions.

@dumbbell
Copy link
CollaboratorAuthor

But, if I am remembering correctly, we would need some sort of migration for existing Khepri DBs to transition from transactions to keep-while and regular commands so that they could add the keep-while conditions.

Yes, exactly. This patch is incomplete on purpose (the needed feature flag is a simple hard-codedtrue for now): I just want to validate the solution first, because updating all bindings and auto-delete exchanges is non-trivial.

Thank you very much for sharing your work! I will take a look at it :-)

the-mikedavis reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@dumbbelldumbbell

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@dumbbell@the-mikedavis

[8]ページ先頭

©2009-2025 Movatter.jp