fix(sessds): Avoid stream hash collisions

This commit is contained in:
ieQu1 2024-02-03 19:32:17 +01:00
parent 2e56810ea2
commit 2e2f3cb2aa
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ del_subscription(SubId, S0) ->
ensure_iterator(TopicFilter, StartTime, SubId, {{RankX, RankY}, Stream}, S) -> ensure_iterator(TopicFilter, StartTime, SubId, {{RankX, RankY}, Stream}, S) ->
%% TODO: hash collisions %% TODO: hash collisions
Key = {SubId, erlang:phash2(Stream)}, Key = {SubId, Stream},
case emqx_persistent_session_ds_state:get_stream(Key, S) of case emqx_persistent_session_ds_state:get_stream(Key, S) of
undefined -> undefined ->
?SLOG(debug, #{ ?SLOG(debug, #{