fix(emqx_slow_subs): fix index update error

This commit is contained in:
lafirest 2022-01-24 18:16:29 +08:00
parent 0fadc85c15
commit 1f718fbb94
1 changed files with 1 additions and 1 deletions

View File

@ -262,7 +262,7 @@ try_insert_to_topk(MaxSize, Now, LastUpdateValue, TimeSpan, Id) ->
-spec find_last_update_value(id()) -> non_neg_integer(). -spec find_last_update_value(id()) -> non_neg_integer().
find_last_update_value(Id) -> find_last_update_value(Id) ->
case ets:next(?INDEX_TAB, ?INDEX(0, Id)) of case ets:next(?INDEX_TAB, ?INDEX(0, Id)) of
#index_tab{index = ?INDEX(LastUpdateValue, Id)} -> ?INDEX(LastUpdateValue, Id) ->
LastUpdateValue; LastUpdateValue;
_ -> _ ->
0 0