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

Remove MAM unused functions and exports #3732

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Conversation

NelsonVides
Copy link
Collaborator

Some functions here are not used, some are used but only locally so we can skip exporting them.

@NelsonVides NelsonVides changed the title Remove unused functions and exports Remove MAM unused functions and exports Aug 12, 2022
@mongoose-im
Copy link
Collaborator

mongoose-im commented Aug 12, 2022

small_tests_24 / small_tests / 4301968
Reports root / small


small_tests_25 / small_tests / 4301968
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 4301968
Reports root/ big
OK: 3340 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 4301968
Reports root/ big
OK: 1897 / Failed: 0 / User-skipped: 513 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 4301968
Reports root/ big
OK: 3323 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 4301968
Reports root/ big
OK: 1897 / Failed: 0 / User-skipped: 513 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 4301968
Reports root/ big
OK: 2018 / Failed: 0 / User-skipped: 392 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 4301968
Reports root/ big
OK: 3714 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 4301968
Reports root/ big
OK: 3340 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 4301968
Reports root/ big
OK: 2314 / Failed: 0 / User-skipped: 387 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 4301968
Reports root/ big
OK: 3714 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 4301968
Reports root/ big
OK: 2175 / Failed: 0 / User-skipped: 380 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 4301968
Reports root/ big
OK: 3709 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 4301968
Reports root/ big
OK: 3713 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive
{error,{{assertion_failed,assert,is_groupchat_message,
              [<<"Restorable message">>],
              undefined,"undefined"},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {muc_SUITE,wait_for_mam_result,3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4394}]},
     {muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4130}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4126}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1291}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1223}]}]}}

Report log


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 4301968
Reports root/ big
OK: 3339 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

mam_SUITE:rdbms_async_pool_prefs_cases:end_per_group
{error,
 {{badrpc,
   {'EXIT',
  {{start_child_failed,
    {error,
     {{shutdown,
     {failed_to_start_child,'pm_mam_async_pool_test type',
      {shutdown,
       {failed_to_start_child,
      'wpool_pool-pm_mam_async_pool_test type-process-sup',
      {shutdown,
       {failed_to_start_child,
        'wpool_pool-pm_mam_async_pool_test type-1',
        {already_started,<9142.14576.1>}}}}}}},
    {child,undefined,'pm_mam_sup_async_pool_test type',
     {mongoose_async_pools,start_link,
      [<<"test type">>,pm_mam,
       #{batch_name => insert_mam_messages30,batch_size => 30,
       enabled => true,
       flush_callback => fun mod_mam_rdbms_arch_async:flush/2,
       flush_extra =>
        #{batch_name => insert_mam_messages30,batch_size => 30,
        enabled => true,flush_interval => 2000,pool_size => 16},
       flush_interval => 2000,pool_size => 16,pool_type => batch}]},
     transient,false,infinity,supervisor,
     [mongoose_async_pools]}}},
    #{id => 'pm_mam_sup_async_pool_test type',restart => transient,
    start =>
     {mongoose_async_pools,start_link,
      [<<"test type">>,pm_mam,
       #{batch_name => insert_mam_messages30,batch_size => 30,
       enabled => true,
       flush_callback => fun mod_mam_rdbms_arch_async:flush/2,
       flush_extra =>
        #{batch_name => insert_mam_messages30,batch_size => 30,
        enabled => true,flush_interval => 2000,pool_size => 16},
       flush_interval => 2000,pool_size => 16,pool_type => batch}]},
    type =...

Report log

mam_SUITE:rdbms_async_pool_disabled_retraction:mam06:retract_message
{error,{{archive_size,1,[{times,200,0}]},
    [{mongoose_helper,do_wait_until,2,
              [{file,"/home/circleci/project/big_tests/tests/mongoose_helper.erl"},
               {line,371}]},
     {mam_SUITE,'-test_retract_message/1-fun-0-',4,
          [{file,"/home/circleci/project/big_tests/tests/mam_SUITE.erl"},
           {line,1717}]},
     {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,1782}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1291}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1223}]}]}}

Report log


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 4301968
Reports root/ big
OK: 3340 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 4301968
Reports root/ big
OK: 3713 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

rest_client_SUITE:roster:add_and_remove_some_contacts_properly
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"bob_add_and_remove_some_contacts_properly_2630@localhost/res1">>,
          escalus_tcp,<0.19710.2>,
          [{event_manager,<0.19691.2>},
           {server,<<"localhost">>},
           {username,
             <<"bOb_add_and_remove_some_contacts_properly_2630">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.19691.2>},
            {server,<<"localhost">>},
            {username,
              <<"bOb_add_and_remove_some_contacts_properly_2630">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,
             <<"bob_add_and_remove_some_contacts_properly_2630">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,
             <<"bOb_add_and_remove_some_contacts_properly_2630">>},
           {server,<<"localhost">>},
           {password,<<"makrolika">>},
           {stream_id,<<"9ad068a6f06f3cea">>}]},
        5000],
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {rest_client_SUITE,add_contact_check_roster_push,2,
       [{file,
          "/home/circleci/project/big_tests/tests/rest_client_SUITE.erl"},
        {line,1306}]},
     {lists,foreach...

Report log


mssql_mnesia_25 / odbc_mssql_mnesia / 4301968
Reports root/ big
OK: 3714 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Aug 12, 2022

Codecov Report

Merging #3732 (4301968) into master (ea14994) will increase coverage by 0.08%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3732      +/-   ##
==========================================
+ Coverage   82.24%   82.33%   +0.08%     
==========================================
  Files         526      526              
  Lines       33853    33839      -14     
==========================================
+ Hits        27844    27861      +17     
+ Misses       6009     5978      -31     
Impacted Files Coverage Δ
src/mam/mam_iq.erl 83.33% <ø> (+11.90%) ⬆️
src/mam/mod_mam_utils.erl 89.03% <ø> (+2.30%) ⬆️
src/pubsub/mod_pubsub.erl 73.36% <0.00%> (-0.07%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/mod_muc_room.erl 78.68% <0.00%> (+0.17%) ⬆️
src/ejabberd_c2s.erl 89.23% <0.00%> (+0.29%) ⬆️
src/pubsub/mod_pubsub_db_mnesia.erl 92.82% <0.00%> (+0.42%) ⬆️
src/mod_roster.erl 79.42% <0.00%> (+0.71%) ⬆️
src/muc_light/mod_muc_light_db_mnesia.erl 92.63% <0.00%> (+1.05%) ⬆️
src/logger/mongoose_log_filter.erl 79.45% <0.00%> (+1.36%) ⬆️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

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

fine, remove more functions

@arcusfelis arcusfelis merged commit b9b7836 into master Aug 12, 2022
@arcusfelis arcusfelis deleted the remove_unused_mam_code branch August 12, 2022 12:55
@chrzaszcz chrzaszcz added this to the 6.0.0 milestone Dec 12, 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

4 participants