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

Same stanza id for peers #3376

Merged
merged 4 commits into from
Oct 28, 2021
Merged

Same stanza id for peers #3376

merged 4 commits into from
Oct 28, 2021

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented Oct 28, 2021

Implement a configuration flag to allow for the mam_id to be shared between sender and receiver in 1:1 chats. This works simply by setting the mam_id as persistent in the mongoose_acc, so that the receiver, if on the same cluster, can reuse the same ID.

doc/modules/mod_mam.md Outdated Show resolved Hide resolved
@mongoose-im

This comment has been minimized.

@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #3376 (b816c7d) into master (f15009b) will increase coverage by 0.34%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3376      +/-   ##
==========================================
+ Coverage   80.37%   80.71%   +0.34%     
==========================================
  Files         397      397              
  Lines       32438    32445       +7     
==========================================
+ Hits        26072    26188     +116     
+ Misses       6366     6257     -109     
Impacted Files Coverage Δ
src/mam/mod_mam.erl 89.34% <100.00%> (+0.13%) ⬆️
src/mam/mod_mam_meta.erl 94.73% <100.00%> (ø)
src/mam/mod_mam_utils.erl 89.50% <100.00%> (+0.13%) ⬆️
src/domain/mongoose_domain_loader.erl 77.35% <0.00%> (-1.89%) ⬇️
src/mod_roster.erl 78.85% <0.00%> (-0.24%) ⬇️
src/mod_muc_log.erl 77.88% <0.00%> (ø)
src/global_distrib/mod_global_distrib_receiver.erl 80.00% <0.00%> (ø)
src/mod_muc_room.erl 77.14% <0.00%> (+0.17%) ⬆️
src/pubsub/mod_pubsub_db_rdbms.erl 95.34% <0.00%> (+0.25%) ⬆️
src/rdbms/mongoose_rdbms.erl 60.48% <0.00%> (+0.40%) ⬆️
... and 9 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 f15009b...b816c7d. Read the comment docs.

@mongoose-im

This comment has been minimized.

Also test that pm keys are not accepted in muc config, but accepted
correctly in the pm section.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 28, 2021

small_tests_24 / small_tests / b816c7d
Reports root / small


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


small_tests_23 / small_tests / b816c7d
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / b816c7d
Reports root/ big
OK: 2709 / Failed: 0 / User-skipped: 185 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / b816c7d
Reports root/ big
OK: 2698 / Failed: 1 / User-skipped: 202 / Auto-skipped: 0

mam_SUITE:rdbms_async_pool_prefs_cases:messages_filtered_when_prefs_default_policy_is_roster
{error,{test_case_failed,"ASSERT EQUAL\n\tExpected []\n\tValue [ok]\n"}}

Report log


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


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / b816c7d
Reports root/ big
OK: 2709 / Failed: 0 / User-skipped: 185 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / b816c7d
Reports root/ big
OK: 2709 / Failed: 0 / User-skipped: 185 / Auto-skipped: 0


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


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / b816c7d
Reports root/ big
OK: 1864 / Failed: 0 / User-skipped: 323 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / b816c7d
Reports root/ big
OK: 3078 / Failed: 0 / User-skipped: 212 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / b816c7d
Reports root/ big
OK: 3077 / Failed: 1 / User-skipped: 212 / Auto-skipped: 0

inbox_SUITE:one_to_one:user_has_two_conversations
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"kate_user_has_two_conversations_3.258357@localhost/res1">>,
          escalus_tcp,<0.17415.0>,
          [{event_manager,<0.17319.0>},
           {server,<<"localhost">>},
           {username,<<"kate_user_has_two_conversations_3.258357">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.17319.0>},
            {server,<<"localhost">>},
            {username,
              <<"kate_user_has_two_conversations_3.258357">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"kate_user_has_two_conversations_3.258357">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"kate_user_has_two_conversations_3.258357">>},
           {server,<<"localhost">>},
           {password,<<"makrowe;p">>},
           {stream_id,<<"0bbe548dff5400ee">>}]},
        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_helper,check_inbox,4,
       [{file,"/home/circleci/app/big_tests/tests/inbox_helper.erl"},
        {line,167}]},
     {inbox_SUI...

Report log


pgsql_mnesia_23 / pgsql_mnesia / b816c7d
Reports root/ big
OK: 3078 / Failed: 0 / User-skipped: 212 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / b816c7d
Reports root/ big
OK: 3061 / Failed: 0 / User-skipped: 229 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / b816c7d
Reports root/ big
OK: 1710 / Failed: 0 / User-skipped: 326 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / b816c7d
Reports root/ big
OK: 3075 / Failed: 3 / User-skipped: 212 / Auto-skipped: 0

service_domain_db_SUITE:db:db_keeps_syncing_after_cluster_join
{error,{test_case_failed,{[<<"example1.com">>],
              [<<"example1.com">>,<<"example2.com">>]}}}

Report log

service_domain_db_SUITE:db:rest_with_auth:rest_delete_domain_cleans_data_from_mam
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"bob_rest_delete_domain_cleans_data_from_mam_47.51066@example.org/res1">>,
          escalus_tcp,<0.13073.2>,
          [{event_manager,<0.13067.2>},
           {server,<<"example.org">>},
           {username,
             <<"bob_rest_delete_domain_cleans_data_from_mam_47.51066">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.13067.2>},
            {server,<<"example.org">>},
            {username,
              <<"bob_rest_delete_domain_cleans_data_from_mam_47.51066">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,
             <<"bob_rest_delete_domain_cleans_data_from_mam_47.51066">>},
           {server,<<"example.org">>},
           {host,<<"localhost">>},
           {port,5232},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,
             <<"bob_rest_delete_domain_cleans_data_from_mam_47.51066">>},
           {server,<<"example.org">>},
           {host,<<"localhost">>},
           {password,<<"makota3">>},
           {port,5232},
           {stream_id,<<"36c3a41c304a6ef5">>}]},
        5000],
       [{file,
          "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {service_domain_db_SUITE,
       '-rest_delete_domain_cleans_data_from_mam/1-fun-0-',5,
   ...

Report log

service_domain_db_SUITE:db:rest_without_auth:rest_delete_domain_cleans_data_from_mam
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"bob_rest_delete_domain_cleans_data_from_mam_55.514756@example.org/res1">>,
          escalus_tcp,<0.13712.2>,
          [{event_manager,<0.13706.2>},
           {server,<<"example.org">>},
           {username,
             <<"bob_rest_delete_domain_cleans_data_from_mam_55.514756">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.13706.2>},
            {server,<<"example.org">>},
            {username,
              <<"bob_rest_delete_domain_cleans_data_from_mam_55.514756">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,
             <<"bob_rest_delete_domain_cleans_data_from_mam_55.514756">>},
           {server,<<"example.org">>},
           {host,<<"localhost">>},
           {port,5232},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,
             <<"bob_rest_delete_domain_cleans_data_from_mam_55.514756">>},
           {server,<<"example.org">>},
           {host,<<"localhost">>},
           {password,<<"makota3">>},
           {port,5232},
           {stream_id,<<"0e830232de39517d">>}]},
        5000],
       [{file,
          "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {service_domain_db_SUITE,
       '-rest_delete_domain_cleans_data_from_mam/1-fun-0-',5...

Report log


mssql_mnesia_24 / odbc_mssql_mnesia / b816c7d
Reports root/ big
OK: 3078 / Failed: 0 / User-skipped: 212 / Auto-skipped: 0

@arcusfelis arcusfelis merged commit 9786b66 into master Oct 28, 2021
@arcusfelis arcusfelis deleted the same_stanza_id_for_peers branch October 28, 2021 18:30
@Premwoik Premwoik modified the milestones: 5.1.0, 5.0.0 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.

4 participants