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

Make the IDs for the inbox pagination unique #3843

Merged
merged 4 commits into from
Nov 9, 2022

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented Nov 7, 2022

Mix the jid into the query to make rsm IDs unique.
IDs look now like

<<(integer_to_binary(Timestamp))/binary, "/", (base64:encode(jid:to_bare_binary(Jid)))/binary>>

@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Base: 83.03% // Head: 83.05% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (4f07579) compared to base (5d3c85d).
Patch coverage: 88.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3843      +/-   ##
==========================================
+ Coverage   83.03%   83.05%   +0.02%     
==========================================
  Files         529      529              
  Lines       33902    33919      +17     
==========================================
+ Hits        28152    28173      +21     
+ Misses       5750     5746       -4     
Impacted Files Coverage Δ
src/inbox/mod_inbox.erl 87.44% <80.00%> (-0.06%) ⬇️
src/inbox/mod_inbox_utils.erl 96.55% <100.00%> (+0.44%) ⬆️
src/rdbms/mongoose_rdbms.erl 65.96% <0.00%> (-1.06%) ⬇️
src/pubsub/mod_pubsub_db_mnesia.erl 92.40% <0.00%> (-0.43%) ⬇️
src/mod_roster.erl 78.46% <0.00%> (-0.24%) ⬇️
src/mod_muc_room.erl 78.51% <0.00%> (-0.18%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/inbox/mod_inbox_rdbms_async.erl 72.05% <0.00%> (ø)
src/ejabberd_c2s.erl 89.25% <0.00%> (+0.29%) ⬆️
src/muc_light/mod_muc_light_db_mnesia.erl 92.63% <0.00%> (+1.05%) ⬆️
... and 5 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 8, 2022

small_tests_24 / small_tests / 7d84d79
Reports root / small


small_tests_25 / small_tests / 7d84d79
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 7d84d79
Reports root/ big
OK: 2099 / Failed: 0 / User-skipped: 783 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 7d84d79
Reports root/ big
OK: 3997 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 7d84d79
Reports root/ big
OK: 3997 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 7d84d79
Reports root/ big
OK: 3971 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 7d84d79
Reports root/ big
OK: 2099 / Failed: 0 / User-skipped: 783 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 7d84d79
Reports root/ big
OK: 2235 / Failed: 0 / User-skipped: 647 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 7d84d79
Reports root/ big
OK: 3997 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 7d84d79
Reports root/ big
OK: 2577 / Failed: 0 / User-skipped: 640 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 7d84d79
Reports root/ big
OK: 4371 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 7d84d79
Reports root/ big
OK: 4371 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 7d84d79
Reports root/ big
OK: 4357 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 7d84d79
Reports root/ big
OK: 2423 / Failed: 0 / User-skipped: 626 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 7d84d79
Reports root/ big
OK: 4371 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

@NelsonVides NelsonVides marked this pull request as ready for review November 8, 2022 13:06
Base automatically changed from inbox/pagination to master November 8, 2022 14:05
src/inbox/mod_inbox.erl Outdated Show resolved Hide resolved
@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 9, 2022

small_tests_24 / small_tests / 4f07579
Reports root / small


small_tests_25 / small_tests / 4f07579
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 4f07579
Reports root/ big
OK: 2099 / Failed: 0 / User-skipped: 783 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 4f07579
Reports root/ big
OK: 3997 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 4f07579
Reports root/ big
OK: 2099 / Failed: 0 / User-skipped: 783 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 4f07579
Reports root/ big
OK: 3997 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 4f07579
Reports root/ big
OK: 3971 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 4f07579
Reports root/ big
OK: 2577 / Failed: 0 / User-skipped: 640 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 4f07579
Reports root/ big
OK: 2234 / Failed: 1 / User-skipped: 647 / Auto-skipped: 0

graphql_roster_SUITE:user_roster:user_decline_subscription_ask
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"bob_user_decline_subscription_ask_897@localhost/res1">>,
          escalus_tcp,<0.21721.0>,
          [{event_manager,<0.21719.0>},
           {server,<<"localhost">>},
           {username,<<"bOb_user_decline_subscription_ask_897">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.21719.0>},
            {server,<<"localhost">>},
            {username,<<"bOb_user_decline_subscription_ask_897">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"bob_user_decline_subscription_ask_897">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"bOb_user_decline_subscription_ask_897">>},
           {server,<<"localhost">>},
           {password,<<"makrolika">>},
           {stream_id,<<"d209f9981e4aa5aa">>}]},
        1],
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {graphql_roster_SUITE,user_decline_subscription_ask_story,3,
       [{file,
          "/home/circleci/project/big_tests/tests/graphql_roster_SUITE.erl"},
        {line,520}]},
     {escalus_story,story,4,
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalu...

Report log


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 4f07579
Reports root/ big
OK: 3997 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 4f07579
Reports root/ big
OK: 4371 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 4f07579
Reports root/ big
OK: 2423 / Failed: 0 / User-skipped: 626 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 4f07579
Reports root/ big
OK: 4371 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 4f07579
Reports root/ big
OK: 4357 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 4f07579
Reports root/ big
OK: 4371 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 4f07579
Reports root/ big
OK: 2235 / Failed: 0 / User-skipped: 647 / Auto-skipped: 0

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 👌

@chrzaszcz chrzaszcz merged commit e362568 into master Nov 9, 2022
@chrzaszcz chrzaszcz deleted the inbox/unique_pagination_ids branch November 9, 2022 15:01
@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

3 participants