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

Inbox/extend queries #3597

Merged
merged 6 commits into from
Mar 18, 2022
Merged

Inbox/extend queries #3597

merged 6 commits into from
Mar 18, 2022

Conversation

NelsonVides
Copy link
Collaborator

This is useful for example when a conversation is entered, through some
link, to any point in the far past of the conversation, instead of at
the bottom. The inbox might be desired in a two-column layout, like in
many phone apps when displayed horizontally, but if loading from MAM at
some point far in the past, in a conversation whose inbox entry wasn't
already loaded (old conversation, pagination), building the right inbox
snippet would take many round-trips.

@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #3597 (de8d0c9) into inbox/small_refactor (86285b9) will increase coverage by 0.04%.
The diff coverage is 96.66%.

@@                   Coverage Diff                    @@
##           inbox/small_refactor    #3597      +/-   ##
========================================================
+ Coverage                 80.82%   80.86%   +0.04%     
========================================================
  Files                       426      426              
  Lines                     32378    32394      +16     
========================================================
+ Hits                      26169    26197      +28     
+ Misses                     6209     6197      -12     
Impacted Files Coverage Δ
src/inbox/mod_inbox_rdbms.erl 93.12% <90.90%> (-0.43%) ⬇️
src/inbox/mod_inbox.erl 87.42% <100.00%> (-0.29%) ⬇️
src/inbox/mod_inbox_backend.erl 100.00% <100.00%> (ø)
src/inbox/mod_inbox_entries.erl 95.83% <100.00%> (+0.52%) ⬆️
src/inbox/mod_inbox_rdbms_async.erl 67.79% <100.00%> (+2.27%) ⬆️
src/inbox/mod_inbox_utils.erl 98.57% <100.00%> (+0.08%) ⬆️
src/elasticsearch/mongoose_elasticsearch.erl 76.92% <0.00%> (-7.70%) ⬇️
src/mam/mod_mam_muc_rdbms_arch_async.erl 82.85% <0.00%> (-2.86%) ⬇️
src/mam/mod_mam_elasticsearch_arch.erl 85.08% <0.00%> (-1.76%) ⬇️
src/offline/mod_offline.erl 76.08% <0.00%> (-1.09%) ⬇️
... and 8 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 86285b9...de8d0c9. Read the comment docs.

This is useful for example when a conversation is entered, through some
link, to any point in the far past of the conversation, instead of at
the bottom. The inbox might be desired in a two-column layout, like in
many phone apps when displayed horizontally, but if loading from MAM at
some point far in the past, in a conversation whose inbox entry wasn't
already loaded (old conversation, pagination), building the right inbox
snippet would take many round-trips.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 17, 2022

small_tests_24 / small_tests / de8d0c9
Reports root / small


small_tests_23 / small_tests / de8d0c9
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / de8d0c9
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / de8d0c9
Reports root/ big
OK: 2807 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / de8d0c9
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / de8d0c9
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / de8d0c9
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / de8d0c9
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / de8d0c9
Reports root/ big
OK: 1546 / Failed: 0 / User-skipped: 358 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / de8d0c9
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / de8d0c9
Reports root/ big
OK: 1853 / Failed: 0 / User-skipped: 366 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / de8d0c9
Reports root/ big
OK: 3193 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / de8d0c9
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / de8d0c9
Reports root/ big
OK: 3197 / Failed: 1 / User-skipped: 142 / Auto-skipped: 0

service_mongoose_system_metrics_SUITE:system_metrics_are_reported_to_configurable_google_analytics
{error,
  {{assertEqual,
     [{module,service_mongoose_system_metrics_SUITE},
      {line,428},
      {expression,"ActualTrackingIds"},
      {expected,[<<"UA-151671255-1">>,<<"UA-EXTRA-TRACKING-ID">>]},
      {value,[<<"UA-151671255-1">>]}]},
   [{service_mongoose_system_metrics_SUITE,
      events_are_reported_to_tracking_ids,1,
      [{file,
         "/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
       {line,428}]},
    {service_mongoose_system_metrics_SUITE,
      system_metrics_are_reported_to_configurable_google_analytics,1,
      [{file,
         "/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
       {line,230}]},
    {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 / de8d0c9
Reports root/ big
OK: 1696 / Failed: 0 / User-skipped: 365 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / de8d0c9
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0

Base automatically changed from inbox/small_refactor to master March 18, 2022 07:12
@NelsonVides NelsonVides marked this pull request as ready for review March 18, 2022 08:30
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 👍

@@ -167,15 +173,26 @@ clear_inbox(HostType, LUser, LServer) ->
Res = execute_delete(HostType, LUser, LServer),
check_result(Res).

-spec get_entry_properties(HosType :: mongooseim:host_type(),
-spec get_full_entry(HostType :: mongooseim:host_type(),
InboxEntryKey :: mod_inbox:entry_key()) ->
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
InboxEntryKey :: mod_inbox:entry_key()) ->
InboxEntryKey :: mod_inbox:entry_key()) ->

@chrzaszcz chrzaszcz merged commit 0aa6cea into master Mar 18, 2022
@chrzaszcz chrzaszcz deleted the inbox/extend_queries branch March 18, 2022 16:19
@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

4 participants