fix(buffer_worker): fix a wrong assertion
the assertion is to ensure queue items are not binary but should not assert the queue itself
This commit is contained in:
parent
f6b3b930b0
commit
bb26632c8a
|
@ -1084,9 +1084,10 @@ estimate_size(QItem) ->
|
||||||
erlang:external_size(QItem).
|
erlang:external_size(QItem).
|
||||||
|
|
||||||
-spec append_queue(id(), index(), replayq:q(), [queue_query()]) -> replayq:q().
|
-spec append_queue(id(), index(), replayq:q(), [queue_query()]) -> replayq:q().
|
||||||
append_queue(Id, Index, Q, Queries) when not is_binary(Q) ->
|
append_queue(Id, Index, Q, Queries) ->
|
||||||
%% we must not append a raw binary because the marshaller will get
|
%% this assertion is to ensure that we never append a raw binary
|
||||||
%% lost.
|
%% because the marshaller will get lost.
|
||||||
|
false = is_binary(hd(Queries)),
|
||||||
Q0 = replayq:append(Q, Queries),
|
Q0 = replayq:append(Q, Queries),
|
||||||
Q2 =
|
Q2 =
|
||||||
case replayq:overflow(Q0) of
|
case replayq:overflow(Q0) of
|
||||||
|
|
Loading…
Reference in New Issue