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:
Ilya Averyanov 2024-01-31 09:51:49 +02:00 committed by GitHub
commit 5bc67cb288
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 7 deletions

View File

@ -89,7 +89,10 @@ find_new_streams(S) ->
Comm2 = emqx_persistent_session_ds_state:get_seqno(?committed(?QOS_2), S),
shuffle(
emqx_persistent_session_ds_state:fold_streams(
fun(Key, Stream, Acc) ->
fun
(_Key, #srs{it_end = end_of_stream}, Acc) ->
Acc;
(Key, Stream, Acc) ->
case is_fully_acked(Comm1, Comm2, Stream) of
true ->
[{Key, Stream} | Acc];