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

Reduce stringprepping in mod_offline #3009

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

NelsonVides
Copy link
Collaborator

get_max_user_messages gets its parameters from the #offline_msg record,
which when created took the jid:to_lus/1 from a full jid, hence its
arguments are already stringprepped.

resend_offline_message_packet will forward the server parameter down the
stack up to the timestamp function, which needs the stringprepped
parameter, but this was stringprepped already before, so this processed
version can be passed instead.

@mongoose-im

This comment has been minimized.

@mongoose-im

This comment has been minimized.

get_max_user_messages gets its parameters from the #offline_msg record,
which when created took the jid:to_lus/1 from a full jid, hence its
arguments are already stringprepped.

resend_offline_message_packet will forward the server parameter down the
stack up to the timestamp function, which needs the stringprepped
parameter, but this was stringprepped already before, so this processed
version can be passed instead.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 15, 2021

9026.1 / Erlang 23.0.3 / small_tests / dcfc896
Reports root / small


9026.2 / Erlang 23.0.3 / internal_mnesia / dcfc896
Reports root/ big
OK: 1503 / Failed: 0 / User-skipped: 161 / Auto-skipped: 0


9026.4 / Erlang 23.0.3 / mysql_redis / dcfc896
Reports root/ big
OK: 2766 / Failed: 0 / User-skipped: 234 / Auto-skipped: 0


9026.3 / Erlang 23.0.3 / odbc_mssql_mnesia / dcfc896
Reports root/ big
OK: 2771 / Failed: 0 / User-skipped: 229 / Auto-skipped: 0


9026.7 / Erlang 23.0.3 / elasticsearch_and_cassandra_mnesia / dcfc896
Reports root/ big
OK: 331 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


9026.6 / Erlang 23.0.3 / ldap_mnesia / dcfc896
Reports root/ big
OK: 1405 / Failed: 0 / User-skipped: 259 / Auto-skipped: 0


9026.5 / Erlang 23.0.3 / riak_mnesia / dcfc896
Reports root/ big
OK: 1629 / Failed: 0 / User-skipped: 181 / Auto-skipped: 0


9026.9 / Erlang 22.3 / pgsql_mnesia / dcfc896
Reports root/ big / small
OK: 2784 / Failed: 0 / User-skipped: 216 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Jan 15, 2021

Codecov Report

Merging #3009 (b639c66) into master (bd13278) will decrease coverage by 0.00%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3009      +/-   ##
==========================================
- Coverage   79.15%   79.14%   -0.01%     
==========================================
  Files         377      377              
  Lines       32763    32751      -12     
==========================================
- Hits        25933    25921      -12     
  Misses       6830     6830              
Impacted Files Coverage Δ
src/ejabberd_c2s.erl 89.33% <ø> (ø)
src/mongoose_hooks.erl 92.24% <ø> (ø)
src/offline/mod_offline_mnesia.erl 51.47% <50.00%> (+1.47%) ⬆️
src/offline/mod_offline.erl 77.83% <100.00%> (-0.24%) ⬇️
src/offline/mod_offline_chatmarkers.erl 91.66% <100.00%> (-0.14%) ⬇️
src/offline/mod_offline_rdbms.erl 83.82% <100.00%> (-0.90%) ⬇️
src/offline/mod_offline_riak.erl 90.66% <100.00%> (-0.36%) ⬇️
src/cassandra/mongoose_cassandra_worker.erl 73.11% <0.00%> (-1.89%) ⬇️
src/wpool/mongoose_wpool.erl 81.00% <0.00%> (-1.00%) ⬇️
src/muc_light/mod_muc_light_db_mnesia.erl 85.00% <0.00%> (-1.00%) ⬇️
... 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 bd13278...b639c66. Read the comment docs.

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.

Great work!

@chrzaszcz chrzaszcz merged commit 9866d4f into master Jan 19, 2021
@chrzaszcz chrzaszcz deleted the less_stringprepping_in_offline branch January 19, 2021 07:26
@leszke leszke added this to the 4.1.0 milestone Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants