Explorar o código

fix(sessds): Avoid stream hash collisions

ieQu1 %!s(int64=2) %!d(string=hai) anos
pai
achega
2e2f3cb2aa

+ 1 - 1
apps/emqx/src/emqx_persistent_session_ds_stream_scheduler.erl

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