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

Improve pipeline for mod_smart_markers #3068

Merged
merged 1 commit into from
Apr 2, 2021
Merged

Conversation

NelsonVides
Copy link
Collaborator

This module was doing one non-optimal check, that is, it was checking if the user has rights to access a room using the can_access_room hook, before checking that the message being processed actually has any marker to begin with. This is non-optimal, as can_access_room requires another hook call and a DB query to verify affiliations, and will usually return true unless misbehaving clients, while checking whether a message has actually any marker is an in-place check with higher chances to return false.

@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

Merging #3068 (8022223) into master (8a4e707) will decrease coverage by 0.07%.
The diff coverage is 94.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3068      +/-   ##
==========================================
- Coverage   78.76%   78.69%   -0.08%     
==========================================
  Files         378      378              
  Lines       31102    31110       +8     
==========================================
- Hits        24499    24482      -17     
- Misses       6603     6628      +25     
Impacted Files Coverage Δ
src/mod_smart_markers.erl 89.28% <94.44%> (+1.78%) ⬆️
src/ejabberd.erl 45.00% <0.00%> (-10.00%) ⬇️
src/cassandra/mongoose_cassandra_worker.erl 70.75% <0.00%> (-2.36%) ⬇️
src/mod_bosh.erl 91.89% <0.00%> (-2.03%) ⬇️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 71.69% <0.00%> (-1.89%) ⬇️
src/mod_bosh_socket.erl 77.63% <0.00%> (-1.56%) ⬇️
src/wpool/mongoose_wpool.erl 81.00% <0.00%> (-1.00%) ⬇️
src/global_distrib/mod_global_distrib_utils.erl 65.09% <0.00%> (-0.95%) ⬇️
src/ejabberd_sm.erl 75.60% <0.00%> (-0.92%) ⬇️
src/ejabberd_c2s.erl 89.11% <0.00%> (-0.30%) ⬇️
... and 4 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 8a4e707...8022223. Read the comment docs.

Copy link
Collaborator

@DenysGonchar DenysGonchar 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.

@DenysGonchar DenysGonchar merged commit 2322273 into master Apr 2, 2021
@DenysGonchar DenysGonchar deleted the smart_markers branch April 2, 2021 13:11
@leszke leszke added this to the 4.2.0 milestone Apr 16, 2021
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.

3 participants