Skip to content

Commit

Permalink
Merge pull request #4170 from esl/update-cets-with-fixes-for-unknown-…
Browse files Browse the repository at this point in the history
…missing-tables-in-status

Update CETS version with fixes for unknown/missing tables in the status API
  • Loading branch information
chrzaszcz authored Nov 16, 2023
2 parents 503f565 + 6604a3a commit f739c24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.9.0">>},1},
{<<"cets">>,
{git,"https://github.com/esl/cets.git",
{ref,"f715c4a2e4b2bcb9f5c1dcd5164ee5271aefa0a9"}},
{ref,"2ca31058bf616392ed91e4eb8642cc5af872902e"}},
0},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.9.0">>},0},
{<<"cowboy_swagger">>,{pkg,<<"cowboy_swagger">>,<<"2.5.1">>},0},
Expand Down
2 changes: 1 addition & 1 deletion src/ejabberd_sm_cets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cleanup(Node) ->
KeyPattern = {'_', '_', '_', {'_', '$1'}},
Guard = {'==', {node, '$1'}, Node},
R = {KeyPattern, '_', '_'},
cets:sync(?TABLE),
cets:ping_all(?TABLE),
%% This is a full table scan, but cleanup is rare.
Tuples = ets:select(?TABLE, [{R, [Guard], ['$_']}]),
lists:foreach(fun({_Key, _, _} = Tuple) ->
Expand Down
2 changes: 1 addition & 1 deletion src/mod_bosh_cets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ get_sessions() ->
node_cleanup(Node) ->
Guard = {'==', {node, '$1'}, Node},
R = {'_', '_', '$1'},
cets:sync(?TABLE),
cets:ping_all(?TABLE),
%% We don't need to replicate deletes
%% We remove the local content here
ets:select_delete(?TABLE, [{R, [Guard], [true]}]),
Expand Down

0 comments on commit f739c24

Please sign in to comment.