Merge pull request #6844 from lafirest/fix/slow_subs_index

fix(emqx_slow_subs): fix index update error
This commit is contained in:
lafirest 2022-01-24 20:07:36 +08:00 committed by GitHub
commit 7e012b7b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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