Skip to content
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

Handler records don't need the key #3342

Merged
merged 2 commits into from
Oct 15, 2021
Merged

Conversation

NelsonVides
Copy link
Collaborator

Handlers are all queried by a known key, and when the ets is fetched
by the key, the handlers are all deeply-copied, no sharing of keys,
which means the hook key, with all the host types, are copied into
the reader many times. This field can be entirely dropped,
it is not used by run_fold.

Handlers are all queried by a known key, and when the ets is fetched
by the key, the handlers are all deeply-copied, no sharing of keys,
which means the hook key, with all the host types, are copied into
the reader many times. This field can be entirely dropped,
it is not used by run_fold.
@mongoose-im

This comment has been minimized.

@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #3342 (6bb6dc8) into master (8a0f4a9) will decrease coverage by 0.08%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3342      +/-   ##
==========================================
- Coverage   80.72%   80.64%   -0.09%     
==========================================
  Files         397      397              
  Lines       32430    32432       +2     
==========================================
- Hits        26179    26154      -25     
- Misses       6251     6278      +27     
Impacted Files Coverage Δ
src/gen_hook.erl 85.00% <90.90%> (+0.38%) ⬆️
src/mod_roster_mnesia.erl 72.72% <0.00%> (-21.22%) ⬇️
src/mod_roster_riak.erl 81.53% <0.00%> (-15.39%) ⬇️
src/event_pusher/mod_event_pusher_sns.erl 84.21% <0.00%> (-5.27%) ⬇️
src/mod_last_rdbms.erl 96.15% <0.00%> (-3.85%) ⬇️
...c/global_distrib/mod_global_distrib_server_mgr.erl 74.57% <0.00%> (-2.26%) ⬇️
src/mam/mod_mam_muc_rdbms_arch.erl 94.94% <0.00%> (-2.03%) ⬇️
src/logger/mongoose_json_formatter.erl 84.00% <0.00%> (-2.00%) ⬇️
src/mod_last.erl 86.76% <0.00%> (-1.48%) ⬇️
src/privacy/mod_privacy_rdbms.erl 80.51% <0.00%> (-1.03%) ⬇️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a0f4a9...6bb6dc8. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 14, 2021

small_tests_24 / small_tests / 6bb6dc8
Reports root / small


internal_mnesia_24 / internal_mnesia / 6bb6dc8
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 297 / Auto-skipped: 0


small_tests_23 / small_tests / 6bb6dc8
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 6bb6dc8
Reports root/ big
OK: 2702 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 6bb6dc8
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 400 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 6bb6dc8
Reports root/ big
OK: 2685 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 6bb6dc8
Reports root/ big
OK: 2702 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 6bb6dc8
Reports root/ big
OK: 2702 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 6bb6dc8
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 400 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 6bb6dc8
Reports root/ big
OK: 1862 / Failed: 0 / User-skipped: 323 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 6bb6dc8
Reports root/ big
OK: 3071 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 6bb6dc8
Reports root/ big
OK: 3054 / Failed: 0 / User-skipped: 228 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 6bb6dc8
Reports root/ big
OK: 3071 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 6bb6dc8
Reports root/ big
OK: 3081 / Failed: 2 / User-skipped: 211 / Auto-skipped: 0

inbox_SUITE:one_to_one:reset_unread_counter_and_show_only_unread
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"mike_reset_unread_counter_and_show_only_unread_73.229543@localhost/res1">>,
          escalus_tcp,<0.17223.0>,
          [{event_manager,<0.17145.0>},
           {server,<<"localhost">>},
           {username,
             <<"mike_reset_unread_counter_and_show_only_unread_73.229543">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.17145.0>},
            {server,<<"localhost">>},
            {username,
              <<"mike_reset_unread_counter_and_show_only_unread_73.229543">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,
             <<"mike_reset_unread_counter_and_show_only_unread_73.229543">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,
             <<"mike_reset_unread_counter_and_show_only_unread_73.229543">>},
           {server,<<"localhost">>},
           {password,<<"nicniema">>},
           {stream_id,<<"70ac1705211933fa">>}]},
        5000],
       [{file,
          "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {inbox_helper,get_inbox,3,
       [{file,"/home/circleci/app/big_tests/tests/inbox_helper.erl"},
        {line,221}]},
     {inbox_SUITE,'-...

Report log

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_74.859375@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_74.859375@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"vW9T7W+2pr2ZymNTFG2zlw==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/app/big_tests/tests/pep_SUITE.erl"},
       {line,384}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1292}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1224}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / 6bb6dc8
Reports root/ big
OK: 1709 / Failed: 0 / User-skipped: 326 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 6bb6dc8
Reports root/ big
OK: 3071 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, nice simplification

@vkatsuba vkatsuba merged commit 6878526 into master Oct 15, 2021
@vkatsuba vkatsuba deleted the hooks/remove_duplicated_key branch October 15, 2021 06:49
@Premwoik Premwoik added this to the 5.1.0 milestone May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants