state_changing crash in classic queue when enabling feature flag stream_queues #5018
-
We are seeing a few of these crashes while enabling the feature flag
I wonder if this "let it crash" behaviour is intentional for the short period while the feature flag is in a transitional state? Also it looks like it is harmless as the queue is restarted and continues without issue. Could you confirm there is no data loss in this case? We don't see any more consequences of this, but I am wondering could this cause more major crashes if eg too many queues hit this transitional state and some supervisor hits max intensity? thanks in advance for the insights |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
It would be nice to handle the exception, the function is fairly trivial: confirm_to_sender(Pid, QName, MsgSeqNos) ->
%% the stream queue included the queue type refactoring and thus requires
%% a different message format
Evt = case rabbit_ff_registry:is_enabled(stream_queue) of
true ->
{queue_event, QName, {confirm, MsgSeqNos, self()}};
false ->
{confirm, MsgSeqNos, self()}
end,
gen_server2:cast(Pid, Evt). |
Beta Was this translation helpful? Give feedback.
-
As discussed with @michaelklishin, calling The correct function is |
Beta Was this translation helpful? Give feedback.
-
thanks for the explanation, that's what I was missing as I couldn't find any other example of |
Beta Was this translation helpful? Give feedback.
As discussed with @michaelklishin, calling
rabbit_ff_registry:is_enabled/1
is incorrect: it is internal to the feature flags subsystem and may lead to various crashes very difficult to debug every time a feature flag is enabled.The correct function is
rabbit_feature_flags:is_enabled/1
. This one will always return a boolean. It does take care of the wait if there is a need for it.