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

Reset last_event_id once mongoose_domain_core starts #3226

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

arcusfelis
Copy link
Contributor

@arcusfelis arcusfelis commented Aug 20, 2021

This tells to the service, that it needs to read the complete database.
But it assumes that the service process is down, so it would not
overwrite the last_event_id we set here.

To ensure that the service is down if the core is down,
the core and service processes should be supervised with rest_for_one strategy.

Which should be done in a separate PR. Though, it does not required to fix the "join cluster" issue.

This PR addresses MIM-1470

This tells to the service, that it needs to read the complete database.
But it assumes that the service process is down, so it would not
overwrite the last_event_id we set here.

To ensure that the service is down if the core is down,
the core and service processes should be supervised with rest_for_one strategy.

Which is in a separate PR.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Aug 20, 2021

small_tests_24 / small_tests / d0880a6
Reports root / small


internal_mnesia_24 / internal_mnesia / d0880a6
Reports root/ big
OK: 1588 / Failed: 0 / User-skipped: 288 / Auto-skipped: 0


small_tests_22 / small_tests / d0880a6
Reports root / small


dynamic_domains_24 / pgsql_mnesia / d0880a6
Reports root/ big
OK: 1644 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


dynamic_domains_23 / pgsql_mnesia / d0880a6
Reports root/ big
OK: 1644 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


small_tests_23 / small_tests / d0880a6
Reports root / small


ldap_mnesia_24 / ldap_mnesia / d0880a6
Reports root/ big
OK: 1515 / Failed: 0 / User-skipped: 361 / Auto-skipped: 0


ldap_mnesia_22 / ldap_mnesia / d0880a6
Reports root/ big
OK: 1515 / Failed: 0 / User-skipped: 361 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / d0880a6
Reports root/ big
OK: 1515 / Failed: 0 / User-skipped: 361 / Auto-skipped: 0


pgsql_mnesia_22 / pgsql_mnesia / d0880a6
Reports root/ big
OK: 3087 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / d0880a6
Reports root/ big
OK: 1891 / Failed: 0 / User-skipped: 284 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / d0880a6
Reports root/ big
OK: 3087 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / d0880a6
Reports root/ big
OK: 3087 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / d0880a6
Reports root/ big
OK: 3073 / Failed: 1 / User-skipped: 201 / Auto-skipped: 0

mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted
{error,
  {{assertMatch,
     [{module,mod_event_pusher_rabbit_SUITE},
      {line,435},
      {expression,
        "get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
      {pattern,
        "# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
      {value,
        #{<<"from_user_id">> => <<"[email protected]">>,
        <<"message">> => <<>>,
        <<"to_user_id">> =>
          <<"alice_unnamed_37.948766@localhost/res1">>}}]},
   [{mod_event_pusher_rabbit_SUITE,
      '-group_chat_message_received_event_properly_formatted/1-fun-1-',3,
      [{file,
         "/home/circleci/app/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
       {line,435}]},
    {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


mssql_mnesia_24 / odbc_mssql_mnesia / d0880a6
Reports root/ big
OK: 3087 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / d0880a6
Reports root/ big
OK: 1738 / Failed: 0 / User-skipped: 287 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

Merging #3226 (d0880a6) into master (6d68ad1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3226   +/-   ##
=======================================
  Coverage   80.31%   80.32%           
=======================================
  Files         398      398           
  Lines       32505    32506    +1     
=======================================
+ Hits        26108    26111    +3     
+ Misses       6397     6395    -2     
Impacted Files Coverage Δ
src/domain/mongoose_domain_core.erl 88.23% <100.00%> (+0.14%) ⬆️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 71.69% <0.00%> (-1.89%) ⬇️
src/ejabberd_s2s_out.erl 61.27% <0.00%> (-0.69%) ⬇️
...c/global_distrib/mod_global_distrib_server_mgr.erl 76.83% <0.00%> (-0.57%) ⬇️
src/mod_muc.erl 74.88% <0.00%> (-0.23%) ⬇️
src/mod_muc_log.erl 77.88% <0.00%> (ø)
src/mod_muc_room.erl 77.18% <0.00%> (+0.05%) ⬆️
src/pubsub/mod_pubsub.erl 73.23% <0.00%> (+0.05%) ⬆️
src/inbox/mod_inbox_rdbms.erl 93.12% <0.00%> (+0.62%) ⬆️
src/mod_last.erl 87.87% <0.00%> (+1.51%) ⬆️
... and 3 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 6d68ad1...d0880a6. Read the comment docs.

@NelsonVides
Copy link
Collaborator

Can you explain how this proposal solves my question at #3224 (comment)? I'm not sure I understand how the new testcase deals with the issue I had.

Copy link
Collaborator

@NelsonVides NelsonVides left a comment

Choose a reason for hiding this comment

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

Ok, after internal discussion this seems to be the right answer, this will get QA-ed soon enough anyway.

@NelsonVides NelsonVides merged commit df72300 into master Aug 20, 2021
@NelsonVides NelsonVides deleted the mu-reset-last-event-id-from-core branch August 20, 2021 13:59
@Premwoik Premwoik added this to the 5.0.0 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants