-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Don't use process dictionary for bump_reduce_memory_use message #1393
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
This will change the |
OK I'll re-target it for |
786df6a
to
c574fc5
Compare
d675126
to
60d65c0
Compare
src/rabbit_amqqueue_process.erl
Outdated
handle_info(bump_reduce_memory_use, State = #q{ backing_queue = BQ, | ||
backing_queue_state = BQS0 }) -> | ||
BQS1 = BQ:handled_bump_reduce_memory_use(BQS0), | ||
noreply(State#q{ backing_queue_state = BQ:resume(BQS1) }); |
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.
This code calls two callbacks, one of them just updates the state. Should it be a single callback instead?
b84f09c
to
97352a7
Compare
@hairyhum thanks for noticing that the new callback is not necessary. |
The callback is actually necessary, because not every |
This can be used to handle generic messages that the parent gen_server2 wishes to pass to backing queues. Initially used for the bump_reduce_memory_use message. Part of rabbitmq/rabbitmq-server#1393
Alternative for #1388 that does not use process dictionary. Requires rabbitmq/rabbitmq-common#228 Fix waiting_bump values
dd20ef7
to
dff1d20
Compare
@hairyhum got it. Thanks again for the careful reviews. |
Alternative for #1388 that does not use process dictionary.