-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cets/mod register #4146
Cets/mod register #4146
Conversation
d693874
to
5d07387
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4146 +/- ##
==========================================
+ Coverage 83.82% 84.07% +0.24%
==========================================
Files 561 561
Lines 34053 34020 -33
==========================================
+ Hits 28546 28601 +55
+ Misses 5507 5419 -88
☔ View full report in Codecov by Sentry. |
This comment was marked as outdated.
This comment was marked as outdated.
5d07387
to
763f20f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
dbd1eb7
to
b66fc65
Compare
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good in general, and I like the extraction of the ETS creation to one module. I added some comments.
b66fc65
to
45d741d
Compare
This comment was marked as outdated.
This comment was marked as outdated.
The old logic stores a single data structure in the ets table, a "treap", which is then cleaned and scaned, but we might do with simpler code and store the entries directly in the ets table, and clean up by full scans. Using a single treap means that the whole data structure is copied to processes and then garbage collection can be expensive. It also means that two processes adding records might override each other and therefore cause inconsistencies. The pitfall of the ets table is full scans when cleaning old timestamps, but with low timeouts it might be fine, also considering this module should be seldom enabled in public setups.
45d741d
to
3b4a271
Compare
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 3b4a271 small_tests_25 / small_tests / 3b4a271 small_tests_26 / small_tests / 3b4a271 small_tests_26_arm64 / small_tests / 3b4a271 ldap_mnesia_25 / ldap_mnesia / 3b4a271 ldap_mnesia_26 / ldap_mnesia / 3b4a271 dynamic_domains_mysql_redis_26 / mysql_redis / 3b4a271 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 3b4a271 dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 3b4a271 pgsql_cets_26 / pgsql_cets / 3b4a271 pgsql_mnesia_25 / pgsql_mnesia / 3b4a271 internal_mnesia_26 / internal_mnesia / 3b4a271 pgsql_mnesia_26 / pgsql_mnesia / 3b4a271 mysql_redis_26 / mysql_redis / 3b4a271 carboncopy_SUITE:one2one:dropped_client_doesnt_create_duplicate_carbons{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_dropped_client_doesnt_create_duplicate_carbons_597@localhost">>},
{<<"to">>,
<<"alice_dropped_client_doesnt_create_duplicate_carbons_597@localhost/res2">>},
{<<"xmlns">>,<<"jabber:client">>},
{<<"type">>,<<"chat">>}],
[{xmlel,<<"sent">>,
[{<<"xmlns">>,<<"urn:xmpp:carbons:2">>}],
[{xmlel,<<"forwarded">>,
[{<<"xmlns">>,<<"urn:xmpp:forward:0">>}],
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_dropped_client_doesnt_create_duplicate_carbons_597@localhost/res1">>},
{<<"type">>,<<"chat">>},
{<<"to">>,
<<"bob_dropped_client_doesnt_create_duplicate_carbons_597@localhost/res1">>},
{<<"xmlns">>,<<"jabber:client">>}],
[{xmlel,<<"body">>,[],
[{xmlcdata,
<<"And pious action">>}]}]}]}]}]}]},
[{carboncopy_SUITE,
'-dropped_client_doesnt_create_duplicate_carbons/1-fun-0-',4,
[{file,
"/home/circleci/project/big_tests/tests/carboncopy_SUITE.erl"},
{line,189}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_serv... mssql_mnesia_26 / odbc_mssql_mnesia / 3b4a271 mysql_redis_26 / mysql_redis / 3b4a271 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
MIM-2072
This removes mnesia usage from mod_register, which really wasn't really needed, it was using mnesia with
local_content
only.Couldn't resist also simplifying the logic behind what was stored in that ets table, see removing
treap
from it.