Merge pull request #12432 from ieQu1/ds_ignore_fully_replayed_streams
fix(sessds): Stream scheduler must ignore fully replayed streams
This commit is contained in:
commit
5bc67cb288
|
@ -89,13 +89,16 @@ find_new_streams(S) ->
|
||||||
Comm2 = emqx_persistent_session_ds_state:get_seqno(?committed(?QOS_2), S),
|
Comm2 = emqx_persistent_session_ds_state:get_seqno(?committed(?QOS_2), S),
|
||||||
shuffle(
|
shuffle(
|
||||||
emqx_persistent_session_ds_state:fold_streams(
|
emqx_persistent_session_ds_state:fold_streams(
|
||||||
fun(Key, Stream, Acc) ->
|
fun
|
||||||
case is_fully_acked(Comm1, Comm2, Stream) of
|
(_Key, #srs{it_end = end_of_stream}, Acc) ->
|
||||||
true ->
|
Acc;
|
||||||
[{Key, Stream} | Acc];
|
(Key, Stream, Acc) ->
|
||||||
false ->
|
case is_fully_acked(Comm1, Comm2, Stream) of
|
||||||
Acc
|
true ->
|
||||||
end
|
[{Key, Stream} | Acc];
|
||||||
|
false ->
|
||||||
|
Acc
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
[],
|
[],
|
||||||
S
|
S
|
||||||
|
|
Loading…
Reference in New Issue