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

GDPR data retrival for mod_mam_muc @ Riak DBMS #2336

Merged
merged 2 commits into from
Jun 17, 2019

Conversation

rslota
Copy link
Contributor

@rslota rslota commented Jun 13, 2019

There are two new fields that are indexed in Riak schema:

  • owner_jid - (essentially JID of person that "owns" a
    message - for PM that's all messages that include this person,
    for MUC those are all messages that were sent by this person).
  • mam_type - we store information about what MAM module has been used
    to save the message. This is not "really" necessary, as we could
    filter messages for GDPR outside database, or prepare different GDPR
    implementations for PM and MUC, but this would result in either
    slower or more complicated code.

The implementation of GDPR for mod_mam / mod_mam_muc on Riak is now
the same - there are no real differences between those two, other then
mam_type field in the query.

This PR closes #2330 as the solution here is effectively alternative approach to the same issue.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 13, 2019

6681.1 / Erlang 20.3 / small_tests / 4b3bacf
Reports root / small


6681.2 / Erlang 20.3 / internal_mnesia / 4b3bacf
Reports root/ big
OK: 1260 / Failed: 1 / User-skipped: 159 / Auto-skipped: 0

sm_SUITE:parallel:subscription_requests_are_buffered_properly
{error,{{badmatch,false},
    [{escalus_session,stream_management,2,
              [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
               {line,227}]},
     {escalus_connection,connection_step,2,
               [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
                {line,134}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
     {escalus_connection,start,2,
               [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
                {line,118}]},
     {sm_SUITE,'-subscription_requests_are_buffered_properly/1-fun-3-',6,
           [{file,"sm_SUITE.erl"},{line,848}]},
     {escalus_story,story,4,
            [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1546}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1062}]}]}}

Report log


6681.3 / Erlang 20.3 / odbc_mssql_mnesia / 4b3bacf
Reports root/ big
OK: 3141 / Failed: 0 / User-skipped: 272 / Auto-skipped: 0


6681.4 / Erlang 20.3 / ldap_mnesia / 4b3bacf
Reports root/ big
OK: 1212 / Failed: 1 / User-skipped: 198 / Auto-skipped: 0

mod_global_distrib_SUITE:mod_global_distrib:test_pm_with_ungraceful_reconnection_to_different_server
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"eve66.289852@localhost/res1">>,escalus_tcp,
          <0.18950.1>,
          [{event_manager,<0.18941.1>},
           {server,<<"localhost">>},
           {username,<<"eve66.289852">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.18941.1>},
            {server,<<"localhost">>},
            {username,<<"eve66.289852">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"eve66.289852">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"eve66.289852">>},
           {server,<<"localhost">>},
           {password,<<"password">>},
           {port,5222},
           {stream_management,true},
           {stream_id,<<"E4DBD5862AAD951C">>}]},
        10000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {mod_global_distrib_SUITE,
       '-test_pm_with_ungraceful_reconnection_to_different_server/1-fun-0-',
       4,
       [{file,"mod_global_distrib_SUITE.erl"},{line,610}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
        {line,72}]},
    ...

Report log


6681.5 / Erlang 20.3 / elasticsearch_and_cassandra_mnesia / 4b3bacf
Reports root/ big
OK: 528 / Failed: 0 / User-skipped: 51 / Auto-skipped: 0


6681.8 / Erlang 21.3 / mysql_redis / 4b3bacf
Reports root/ big
OK: 3139 / Failed: 0 / User-skipped: 274 / Auto-skipped: 0


6681.7 / Erlang 21.3 / pgsql_mnesia / 4b3bacf
Reports root/ big / small
OK: 3178 / Failed: 1 / User-skipped: 240 / Auto-skipped: 0

push_integration_SUITE:inbox_msg_notifications:muclight_inbox_msg_unread_count_apns
{error,{{assertMatch,[{module,push_integration_SUITE},
            {line,301},
            {expression,"Data"},
            {pattern,"# { << \"message-count\" >> := ExpectedCount }"},
            {value,#{<<"last-message-body">> =>
                   <<"GroupChat message">>,
                 <<"last-message-sender">> =>
                   <<"room_muclight_inbox_msg_unread_count_apns@muclight.localhost/alice23.917877@localhost">>,
                 <<"message-count">> => 3}}]},
    [{push_integration_SUITE,'-check_notification/2-fun-0-',2,
                 [{file,"push_integration_SUITE.erl"},
                  {line,301}]},
     {push_integration_SUITE,'-muclight_inbox_msg_unread_count/3-lc$^0/1-0-',
                 1,
                 [{file,"push_integration_SUITE.erl"},
                  {line,282}]},
     {push_integration_SUITE,'-muclight_inbox_msg_unread_count/3-lc$^0/1-0-',
                 1,
                 [{file,"push_integration_SUITE.erl"},
                  {line,283}]},
     {escalus_story,story,4,
            [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1562}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1080}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1012}]}]}}

Report log


6681.9 / Erlang 21.3 / riak_mnesia / 4b3bacf
Reports root/ big / small
OK: 1487 / Failed: 0 / User-skipped: 143 / Auto-skipped: 0

@rslota rslota force-pushed the rs/gdpr_mam_muc_schema_riak branch from a566900 to e93092a Compare June 13, 2019 13:14
@codecov
Copy link

codecov bot commented Jun 13, 2019

Codecov Report

Merging #2336 into master will increase coverage by 0.36%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2336      +/-   ##
==========================================
+ Coverage   77.96%   78.32%   +0.36%     
==========================================
  Files         335      335              
  Lines       29261    29260       -1     
==========================================
+ Hits        22812    22919     +107     
+ Misses       6449     6341     -108
Impacted Files Coverage Δ
src/mam/mod_mam_riak_timed_arch_yz.erl 64.62% <94.11%> (-11.44%) ⬇️
src/global_distrib/mod_global_distrib_receiver.erl 85.52% <0%> (-3.95%) ⬇️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 82.22% <0%> (-2.23%) ⬇️
src/mod_bosh_socket.erl 80.85% <0%> (-1%) ⬇️
src/ejabberd_c2s.erl 86.64% <0%> (-0.63%) ⬇️
src/mod_muc_log.erl 77.69% <0%> (-0.26%) ⬇️
src/mam/mod_mam_rdbms_arch.erl 51.83% <0%> (+0.4%) ⬆️
src/ejabberd_config.erl 78.29% <0%> (+0.42%) ⬆️
src/mod_muc_room.erl 77.5% <0%> (+0.87%) ⬆️
... and 14 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 d25bb7a...bffb801. Read the comment docs.

@rslota rslota changed the title [WIP] GDPR Retrival mam_muc GDPR data retrival for mod_mam_muc @ Riak DBMS Jun 13, 2019
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 13, 2019

6684.1 / Erlang 20.3 / small_tests / b6534f5
Reports root / small


6684.2 / Erlang 20.3 / internal_mnesia / b6534f5
Reports root/ big
OK: 1238 / Failed: 0 / User-skipped: 159 / Auto-skipped: 0


6684.4 / Erlang 20.3 / ldap_mnesia / b6534f5
Reports root/ big
OK: 1225 / Failed: 2 / User-skipped: 198 / Auto-skipped: 0

pubsub_SUITE:dag+collection:notify_collection_leaf_and_item_test
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"bOb92.907998@localhost/res1">>,escalus_tcp,
          <0.6907.1>,
          [{event_manager,<0.6786.1>},
           {server,<<"localhost">>},
           {username,<<"bOb92.907998">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.6786.1>},
            {server,<<"localhost">>},
            {username,<<"bOb92.907998">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"bOb92.907998">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"bOb92.907998">>},
           {server,<<"localhost">>},
           {password,<<"makrolika">>},
           {stream_id,<<"B91F1EEE0E610ED2">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {pubsub_tools,receive_notification,3,
       [{file,"pubsub_tools.erl"},{line,481}]},
     {pubsub_tools,receive_node_creation_notification,3,
       [{file,"pubsub_tools.erl"},{line,305}]},
     {pubsub_SUITE,'-notify_collection_leaf_and_item_test/1-fun-0-',2,
       [{file,"pubsub_SUITE.erl"},{line,1266}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_bui...

Report log

pubsub_SUITE:dag+collection:notify_collection_leaf_and_item_test
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"bOb98.264430@localhost/res1">>,escalus_tcp,
          <0.7226.1>,
          [{event_manager,<0.7119.1>},
           {server,<<"localhost">>},
           {username,<<"bOb98.264430">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.7119.1>},
            {server,<<"localhost">>},
            {username,<<"bOb98.264430">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"bOb98.264430">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"bOb98.264430">>},
           {server,<<"localhost">>},
           {password,<<"makrolika">>},
           {stream_id,<<"946546253E762C79">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {pubsub_tools,receive_notification,3,
       [{file,"pubsub_tools.erl"},{line,481}]},
     {pubsub_tools,receive_node_creation_notification,3,
       [{file,"pubsub_tools.erl"},{line,305}]},
     {pubsub_SUITE,'-notify_collection_leaf_and_item_test/1-fun-0-',2,
       [{file,"pubsub_SUITE.erl"},{line,1266}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_bui...

Report log


6684.3 / Erlang 20.3 / odbc_mssql_mnesia / b6534f5
Reports root/ big
OK: 3141 / Failed: 0 / User-skipped: 272 / Auto-skipped: 0


6684.5 / Erlang 20.3 / elasticsearch_and_cassandra_mnesia / b6534f5
Reports root/ big
OK: 528 / Failed: 0 / User-skipped: 51 / Auto-skipped: 0


6684.8 / Erlang 21.3 / mysql_redis / b6534f5
Reports root/ big
OK: 3165 / Failed: 2 / User-skipped: 274 / Auto-skipped: 0

pubsub_SUITE:dag+collection:discover_child_nodes_test
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"alicE99.457621@localhost/res1">>,escalus_tcp,
          <0.15234.3>,
          [{event_manager,<0.15138.3>},
           {server,<<"localhost">>},
           {username,<<"alicE99.457621">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.15138.3>},
            {server,<<"localhost">>},
            {username,<<"alicE99.457621">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"alicE99.457621">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"alicE99.457621">>},
           {server,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"69194C5ED506AC14">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {pubsub_tools,receive_response,3,
       [{file,"pubsub_tools.erl"},{line,457}]},
     {pubsub_tools,receive_and_check_response,4,
       [{file,"pubsub_tools.erl"},{line,448}]},
     {pubsub_SUITE,'-discover_child_nodes_test/1-fun-0-',2,
       [{file,"pubsub_SUITE.erl"},{line,1493}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default...

Report log

pubsub_SUITE:dag+collection:notify_collection_and_leaf_test
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"alicE5.85218@localhost/res1">>,escalus_tcp,
          <0.15579.3>,
          [{event_manager,<0.15517.3>},
           {server,<<"localhost">>},
           {username,<<"alicE5.85218">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.15517.3>},
            {server,<<"localhost">>},
            {username,<<"alicE5.85218">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"alicE5.85218">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"alicE5.85218">>},
           {server,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"F60BF41ADAAB2EA8">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {pubsub_tools,receive_response,3,
       [{file,"pubsub_tools.erl"},{line,457}]},
     {pubsub_tools,receive_and_check_response,4,
       [{file,"pubsub_tools.erl"},{line,448}]},
     {pubsub_SUITE,'-notify_collection_and_leaf_test/1-fun-0-',3,
       [{file,"pubsub_SUITE.erl"},{line,1317}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib...

Report log


6684.7 / Erlang 21.3 / pgsql_mnesia / b6534f5
Reports root/ big / small
OK: 3173 / Failed: 0 / User-skipped: 240 / Auto-skipped: 0


6684.9 / Erlang 21.3 / riak_mnesia / b6534f5
Reports root/ big / small
OK: 1487 / Failed: 0 / User-skipped: 143 / Auto-skipped: 0


6684.4 / Erlang 20.3 / ldap_mnesia / b6534f5
Reports root/ big
OK: 1199 / Failed: 0 / User-skipped: 198 / Auto-skipped: 0


6684.8 / Erlang 21.3 / mysql_redis / b6534f5
Reports root/ big
OK: 3138 / Failed: 1 / User-skipped: 274 / Auto-skipped: 0

mam_SUITE:rsm04:pagination_offset5
{'EXIT',tcp_close_timeout}

Report log


6684.8 / Erlang 21.3 / mysql_redis / b6534f5
Reports root/ big
OK: 3138 / Failed: 1 / User-skipped: 274 / Auto-skipped: 0

mam_SUITE:with_rsm03:pagination_simple_before10
{'EXIT',tcp_close_timeout}

Report log


6684.8 / Erlang 21.3 / mysql_redis / b6534f5
Reports root/ big
OK: 3139 / Failed: 0 / User-skipped: 274 / Auto-skipped: 0

%% * RemJID - Nickname of JID of destination
%% * SrcJID - Full JID of user within room (room@domain/user)
%% * OwnerJID - "Real" sender JID (not room specific)
archive_message(Host, MessID, LocJID, RemJID, SrcJID, OwnerJID, Packet, Type) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a feeling that if we need to explain what variable means, depending on some context, we could decompose the logic. However, I understand thats implication of working with legacy code

Copy link
Member

Choose a reason for hiding this comment

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

This would definitely be solved by a refactor (in the future), where we could replace these arguments with parameter map. Indeed now it's confusing as ***.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, indeed this is very confusing. But changing this is this module only will only make things worse, as other MAM backends use exactly the same wording.
@ludwikbukowski I actually tried to provide descriptions without context, because those arguments seem to be abstract enough (in the end, whole logic of this function doesn't do anything specific depending on context), but I simply failed to figure out the proper wording. Still, I believe that having those definitions here even context-specific is better then not having it and guessing each time we develop an extension.

@@ -122,20 +122,26 @@ stop_muc_archive(Host) ->
ejabberd_hooks:delete(mam_muc_remove_archive, Host, ?MODULE, remove_archive, 50),
ok.

%% LocJID - From/To JID depending on direction of message (single message is saved in two directions)
Copy link
Member

Choose a reason for hiding this comment

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

If we're going to explain these here, I think it's more accurate to say:

  • LocJID - archive owner's JID
  • RemJID - interlocutor's JID

archive_message_muc(_Result, Host, MessId, _UserID, LocJID, _FromJID, SrcJID, _Dir, Packet) ->
%% LocJID - MUC/MUC Light room's JID
%% FromJID - "Real" sender JID
%% SrcJID - Full JID of user within room (room@domain/user)
Copy link
Member

Choose a reason for hiding this comment

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

room@domain/nickname, because user may be confused with username

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually didn't want to use nickname as this may also be JID (I think) in case of MUC Light. I agree with the fact thatuser is not the best choice, but nickname doesn't feel generic enough.

Copy link
Member

Choose a reason for hiding this comment

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

OK, fair enough. :)

@@ -231,6 +249,10 @@ create_obj(Host, MsgId, SourceJID, Packet, Type) ->
fun(R) -> riakc_register:set(MsgId, R) end},
{{<<"source_jid">>, register},
fun(R) -> riakc_register:set(SourceJID, R) end},
{{<<"owner_jid">>, register},
Copy link
Member

Choose a reason for hiding this comment

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

owner_jid is kind of ambiguous in MAM context, because it may mean both "message owner" or "archive owner". I think that we should come up with a better name, like sender_jid or real_sender_jid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem here is that, this is not "sender's" JID. In case of MUC, yeah, sure. But for PM this archive owner. Would archive_owner_jid be better? I guess it's not "correct" for MUC in such case. I feel that, there should be a different "schema" for PM and MUC, it would be much less confusing...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually msg_owner_jid feels quite nice. @fenek What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Yup, msg_owner_jid will be accurate IMO. :)

@rslota rslota force-pushed the rs/gdpr_mam_muc_schema_riak branch from 499bfe9 to ee48fa0 Compare June 14, 2019 13:34
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 14, 2019

6686.1 / Erlang 20.3 / small_tests / f0e1936
Reports root / small


6686.2 / Erlang 20.3 / internal_mnesia / f0e1936
Reports root/ big
OK: 1267 / Failed: 2 / User-skipped: 160 / Auto-skipped: 0

pubsub_SUITE:tree+node_config:disable_payload_test
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"alicE57.848272@localhost/res1">>,escalus_tcp,
          <0.8858.1>,
          [{event_manager,<0.8786.1>},
           {server,<<"localhost">>},
           {username,<<"alicE57.848272">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.8786.1>},
            {server,<<"localhost">>},
            {username,<<"alicE57.848272">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"alicE57.848272">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"alicE57.848272">>},
           {server,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"7B3EA8FC092EA111">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {pubsub_tools,receive_response,3,
       [{file,"pubsub_tools.erl"},{line,457}]},
     {pubsub_tools,receive_and_check_response,4,
       [{file,"pubsub_tools.erl"},{line,448}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
        {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{...

Report log

sm_SUITE:parallel:subscription_requests_are_buffered_properly
{error,{{badmatch,false},
    [{escalus_session,stream_management,2,
              [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
               {line,227}]},
     {escalus_connection,connection_step,2,
               [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
                {line,134}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
     {escalus_connection,start,2,
               [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
                {line,118}]},
     {sm_SUITE,'-subscription_requests_are_buffered_properly/1-fun-3-',6,
           [{file,"sm_SUITE.erl"},{line,848}]},
     {escalus_story,story,4,
            [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1546}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1062}]}]}}

Report log


6686.3 / Erlang 20.3 / odbc_mssql_mnesia / f0e1936
Reports root/ big
OK: 3141 / Failed: 0 / User-skipped: 272 / Auto-skipped: 0


6686.4 / Erlang 20.3 / ldap_mnesia / f0e1936
Reports root/ big
OK: 1199 / Failed: 0 / User-skipped: 198 / Auto-skipped: 0


6686.5 / Erlang 20.3 / elasticsearch_and_cassandra_mnesia / f0e1936
Reports root/ big
OK: 528 / Failed: 0 / User-skipped: 51 / Auto-skipped: 0


6686.8 / Erlang 21.3 / mysql_redis / f0e1936
Reports root/ big
OK: 3151 / Failed: 2 / User-skipped: 274 / Auto-skipped: 0

mam_SUITE:with_rsm03:pagination_simple_before10
{'EXIT',tcp_close_timeout}

Report log

pubsub_SUITE:dag+collection:notify_collection_and_leaf_same_user_test
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"alicE67.784158@localhost/res1">>,escalus_tcp,
          <0.14914.3>,
          [{event_manager,<0.14823.3>},
           {server,<<"localhost">>},
           {username,<<"alicE67.784158">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.14823.3>},
            {server,<<"localhost">>},
            {username,<<"alicE67.784158">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"alicE67.784158">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"alicE67.784158">>},
           {server,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"D02C4A1D8EC32705">>}]},
        5000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {pubsub_tools,receive_response,3,
       [{file,"pubsub_tools.erl"},{line,457}]},
     {pubsub_tools,receive_and_check_response,4,
       [{file,"pubsub_tools.erl"},{line,448}]},
     {pubsub_SUITE,'-notify_collection_and_leaf_same_user_test/1-fun-0-',
       2,
       [{file,"pubsub_SUITE.erl"},{line,1343}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/...

Report log


6686.7 / Erlang 21.3 / pgsql_mnesia / f0e1936
Reports root/ big / small
OK: 3173 / Failed: 0 / User-skipped: 240 / Auto-skipped: 0


6686.9 / Erlang 21.3 / riak_mnesia / f0e1936
Reports root/ big / small
OK: 1500 / Failed: 1 / User-skipped: 143 / Auto-skipped: 0

mod_global_distrib_SUITE:mod_global_distrib:test_pm_with_ungraceful_reconnection_to_different_server
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"eve58.980122@localhost/res1">>,escalus_tcp,
          <0.30664.1>,
          [{event_manager,<0.30655.1>},
           {server,<<"localhost">>},
           {username,<<"eve58.980122">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.30655.1>},
            {server,<<"localhost">>},
            {username,<<"eve58.980122">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"eve58.980122">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"eve58.980122">>},
           {server,<<"localhost">>},
           {password,<<"password">>},
           {port,5222},
           {stream_management,true},
           {stream_id,<<"25CB186B2ED560B7">>}]},
        10000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {mod_global_distrib_SUITE,
       '-test_pm_with_ungraceful_reconnection_to_different_server/1-fun-0-',
       4,
       [{file,"mod_global_distrib_SUITE.erl"},{line,610}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
        {line,72}]},
    ...

Report log


6686.8 / Erlang 21.3 / mysql_redis / f0e1936
Reports root/ big
OK: 3139 / Failed: 0 / User-skipped: 274 / Auto-skipped: 0

There are two new fields that are indexed in Riak schema:
 * `owner_jid` - (essentially JID of person that "owns" a
   message - for PM that's all messages that include this person,
   for MUC those are all messages that were sent by this person).
 * `mam_type` - we store information about what MAM module has been used
   to save the message. This is not "really" necessary, as we could
   filter messages for GDPR outside database, or prepare different GDPR
   implementations for PM and MUC, but this would result in either
   slower or more complicated code.

The implementation of GDPR for `mod_mam` / `mod_mam_muc` on Riak is now
the same - there are no real differences between those two, other then
`mam_type` field in the query.
@rslota rslota force-pushed the rs/gdpr_mam_muc_schema_riak branch from ee48fa0 to bffb801 Compare June 17, 2019 07:46
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 17, 2019

6690.1 / Erlang 20.3 / small_tests / 0bd977b
Reports root / small


6690.2 / Erlang 20.3 / internal_mnesia / 0bd977b
Reports root/ big
OK: 1288 / Failed: 4 / User-skipped: 160 / Auto-skipped: 0

pubsub_SUITE:tree+basic:subscribe_options_deliver_option_test
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,<<"pubsub.localhost">>},
         {<<"to">>,<<"bob60.634661@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"princely_musings_LwBt3GA=">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"item1">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pubsub_SUITE,'-subscribe_options_deliver_option_test/1-fun-0-',3,
      [{file,"pubsub_SUITE.erl"},{line,444}]},
    {escalus_story,story,4,
      [{file,
         "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1546}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1062}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,994}]}]}}

Report log

pubsub_SUITE:tree+basic:request_all_items_test
{error,{{badmatch,false},
    [{pubsub_tools,check_response,2,
             [{file,"pubsub_tools.erl"},{line,468}]},
     {pubsub_tools,receive_response,3,
             [{file,"pubsub_tools.erl"},{line,458}]},
     {pubsub_tools,receive_and_check_response,4,
             [{file,"pubsub_tools.erl"},{line,448}]},
     {escalus_story,story,4,
            [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1546}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1062}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,994}]}]}}

Report log

pubsub_SUITE:tree+node_config:notify_only_available_users_test
{error,{{badmatch,false},
    [{pubsub_tools,check_response,2,
             [{file,"pubsub_tools.erl"},{line,468}]},
     {pubsub_tools,receive_response,3,
             [{file,"pubsub_tools.erl"},{line,458}]},
     {pubsub_tools,receive_and_check_response,4,
             [{file,"pubsub_tools.erl"},{line,448}]},
     {escalus_story,story,4,
            [{file,"/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1546}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1062}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,994}]}]}}

Report log

mod_global_distrib_SUITE:mod_global_distrib:test_pm_with_ungraceful_reconnection_to_different_server
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"eve47.812065@localhost/res1">>,escalus_tcp,
          <0.20881.1>,
          [{event_manager,<0.20872.1>},
           {server,<<"localhost">>},
           {username,<<"eve47.812065">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.20872.1>},
            {server,<<"localhost">>},
            {username,<<"eve47.812065">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"eve47.812065">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"eve47.812065">>},
           {server,<<"localhost">>},
           {password,<<"password">>},
           {port,5222},
           {stream_management,true},
           {stream_id,<<"11F0E1FD371D78BB">>}]},
        10000],
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,138}]},
     {mod_global_distrib_SUITE,
       '-test_pm_with_ungraceful_reconnection_to_different_server/1-fun-0-',
       4,
       [{file,"mod_global_distrib_SUITE.erl"},{line,610}]},
     {escalus_story,story,4,
       [{file,
          "/home/travis/build/esl/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
        {line,72}]},
    ...

Report log


6690.3 / Erlang 20.3 / odbc_mssql_mnesia / 0bd977b
Reports root/ big
OK: 3141 / Failed: 0 / User-skipped: 272 / Auto-skipped: 0


6690.5 / Erlang 20.3 / elasticsearch_and_cassandra_mnesia / 0bd977b
Reports root/ big
OK: 528 / Failed: 0 / User-skipped: 51 / Auto-skipped: 0


6690.4 / Erlang 20.3 / ldap_mnesia / 0bd977b
Reports root/ big
OK: 1199 / Failed: 0 / User-skipped: 198 / Auto-skipped: 0


6690.8 / Erlang 21.3 / mysql_redis / 0bd977b
Reports root/ big
OK: 3139 / Failed: 0 / User-skipped: 274 / Auto-skipped: 0


6690.7 / Erlang 21.3 / pgsql_mnesia / 0bd977b
Reports root/ big / small
OK: 3173 / Failed: 0 / User-skipped: 240 / Auto-skipped: 0


6690.9 / Erlang 21.3 / riak_mnesia / 0bd977b
Reports root/ big / small
OK: 1487 / Failed: 0 / User-skipped: 143 / Auto-skipped: 0


6690.2 / Erlang 20.3 / internal_mnesia / 0bd977b
Reports root/ big
OK: 1238 / Failed: 0 / User-skipped: 159 / Auto-skipped: 0

@rslota
Copy link
Contributor Author

rslota commented Jun 17, 2019

@fenek Any other comments, or shall we just merge it?

@fenek fenek merged commit daacc8b into master Jun 17, 2019
@fenek fenek deleted the rs/gdpr_mam_muc_schema_riak branch June 17, 2019 15:20
@fenek fenek added this to the MongooseIM 3.3.0++ milestone Jun 18, 2019
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