| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- the call to update_ch_record in the is_ch_blocked(C1) == false
branch was superfluos since the preceding update_consumer_count
calls update_ch_record
- all the checking whether the channel is blocked, and associated
branching was just an optimisation. And not a particularly important
one, since a) the "a new consumer comes along while its
channel is blocked" case is hardly on the critical path, and b)
exactly the same check is performed as part of run_message_queue (in
deliver_msg_to_consumer/3). So get rid of it.
- the is_empty & send_drained logic can be invoked earlier, which
allows us to use the #cr we have rather than looking it up again. We
can do this since the only case we need to catch here is that of a
consumer coming along while the queue is empty already. If it
becomes empty as part of run_message_queue then send_drained will be
invoked in 'fetch'.
|
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| | |
when the channel is blocked there is no point going through the
expensive consumer re-partitioning
|
| | |
| |
| |
| |
| | |
it's convenient for callers to have maybe_send_drained thread through
the state
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
move functions to a better place
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
ported from bug 23749
|
| | | |
|
| | |
| |
| |
| | |
and optimise handle_cast/credit along the way
|
| | | |
|
| | |
| |
| |
| |
| | |
and in the resulting refactor also remove a non-linear BQS access in
handle_info/drop_expired.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| | |\ |
|
| | | |
| | |
| | |
| | | |
but have unsynced slaves at that point.
|
| | | | |
|
| | |\ \ |
|
| | | |\ \ |
|
| | | | |\ \ |
|
| | | | | |\ \ |
|
| | | | | |/ / |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
that the parameter exists.
|
| | | | |/ / |
|
| | | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Specifically in all the cases where handle_other might have changed
the connection_state.
This is most straightforward and obvious to guarantee by always
invoking recvloop after handle_other, unless we are stopping.
This does expose an inconsistency in the various non-throw/exit
termination cases: two of them were returning State, the other
ok. Let's go with the latter; it's easiest.
We also take the opportunity to eliminate 'Deb' from the handle_other
signature. This is only needed in the {system, ...} message case,
which we now handle specially.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It makes no difference whether we call handle_exception before or
after control_throttle, so lets use an order that more clearly calls
out the similarity to the controlled exit case.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
by re-introducing a call to control_throttle.
This was present in 3.0.x, and is needed there, but is actually not
needed here, due to other changes made in the area. But the reason is
quite subtle...
For control_throttle to do something here, the channel_cleanup would
have to be called for a channel for which we have run out of
credit. Now, credit is only consumed when sending content-bearing
methods to the channel with rabbit_channel:do_flow. There is a
subsequent invocation of control_throttle in the code which will set
the connection_state to 'blocking'. But this is immediately followed
by a call to post_process_frame. The frame we are looking at must be
the last frame of a content-bearing method, since otherwise the method
would not be complete and we wouldn't have passed it to the
channel. Hence that frame can only be a content_header or, more
likely, a content_body. For both of these, post_process_frame invokes
maybe_block, which will turn a 'blocking' into 'blocked'. And from
that point onwards we will no longer read anything from the socket or
process anything already in buf. So we certainly can't be processing a
channel.close_ok.
In other words, post_process_frame can only be invoked with a
channel.close_ok frame when the connection_state is 'running', or
blocking/blocked for a reason other than having run out of credit for
a channel, i.e. an alarm. Therefore forgetting about the channel as
part of the channel_cleanup call does not have an effect on
credit_flow:blocked(). And hence an invocation of control_throttle
will not alter the connection_state and is therefore unnecessary.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- handle the no-op case (controlled exit of a channel we've forgotten
about already) explicitly
- better clause order and formatting.
|
| | | | | |
|
| | |\ \ \ |
|
| | | | | | |
|
| | | | | | |
|
| | | |\ \ \
| | | |/ /
| | |/| | |
|
| | | |\ \ \ |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
boot/0 or start/0, create a new process to hold the name instead.
|
| | | |/ / /
| | | | |
| | | | |
| | | | | |
stopping.
|
| | | | | | |
|
| | | | | | |
|