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

Fix mod_event_pusher_push MUC Light error #3526

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gustawlippa
Copy link
Contributor

@gustawlippa gustawlippa commented Jan 31, 2022

When a stanza was addressed to a room, there were errors in the logs due to a failed hook filter_local_packet running with To being the sender (mod_event_pusher:push_event/3 failed on the ETS lookup, because the name was expecting a Host, not a MUC Light host). The problem originates from the fact, that filter_local_packet is called twice when processing a MUC Light message (see the comment).

From what I understand, this change would mean that the notification will be processed (maybe tried to be sent?) in the context of the room - "to" the room itself.

This caused problems with stanzas addressed to a room.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 31, 2022

small_tests_24 / small_tests / f2843c8
Reports root / small


small_tests_23 / small_tests / f2843c8
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / f2843c8
Reports root/ big
OK: 2691 / Failed: 0 / User-skipped: 238 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / f2843c8
Reports root/ big
OK: 2674 / Failed: 0 / User-skipped: 255 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / f2843c8
Reports root/ big
OK: 2691 / Failed: 0 / User-skipped: 238 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / f2843c8
Reports root/ big
OK: 2691 / Failed: 0 / User-skipped: 238 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / f2843c8
Reports root/ big
OK: 1500 / Failed: 0 / User-skipped: 390 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / f2843c8
Reports root/ big
OK: 1500 / Failed: 0 / User-skipped: 390 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / f2843c8
Reports root/ big
OK: 1541 / Failed: 0 / User-skipped: 349 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / f2843c8
Reports root/ big
OK: 3078 / Failed: 0 / User-skipped: 247 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / f2843c8
Reports root/ big
OK: 3078 / Failed: 0 / User-skipped: 247 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / f2843c8
Reports root/ big
OK: 3073 / Failed: 0 / User-skipped: 252 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / f2843c8
Reports root/ big
OK: 1834 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / f2843c8
Reports root/ big
OK: 3078 / Failed: 0 / User-skipped: 247 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / f2843c8
Reports root/ big
OK: 1680 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #3526 (f2843c8) into master (cc4c859) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3526   +/-   ##
=======================================
  Coverage   81.06%   81.07%           
=======================================
  Files         419      419           
  Lines       32297    32298    +1     
=======================================
+ Hits        26183    26187    +4     
+ Misses       6114     6111    -3     
Impacted Files Coverage Δ
.../event_pusher/mod_event_pusher_hook_translator.erl 88.88% <100.00%> (+0.31%) ⬆️
src/elasticsearch/mongoose_elasticsearch.erl 76.92% <0.00%> (-7.70%) ⬇️
src/mam/mod_mam_elasticsearch_arch.erl 85.08% <0.00%> (-1.76%) ⬇️
src/rdbms/mongoose_rdbms.erl 62.17% <0.00%> (-1.13%) ⬇️
src/mam/mod_mam_rdbms_arch_async.erl 96.66% <0.00%> (-1.12%) ⬇️
src/pubsub/mod_pubsub.erl 73.13% <0.00%> (-0.36%) ⬇️
src/mod_roster.erl 78.75% <0.00%> (-0.24%) ⬇️
src/domain/mongoose_domain_loader.erl 90.17% <0.00%> (+0.89%) ⬆️
src/muc_light/mod_muc_light_db_mnesia.erl 90.52% <0.00%> (+1.05%) ⬆️
src/logger/mongoose_log_filter.erl 79.45% <0.00%> (+1.36%) ⬆️
... and 5 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 cc4c859...f2843c8. Read the comment docs.

@gustawlippa gustawlippa marked this pull request as ready for review February 3, 2022 15:17
@gustawlippa gustawlippa marked this pull request as draft March 28, 2022 15:35
@gustawlippa
Copy link
Contributor Author

Todo: compare whether #3551 is not a better solution.
When merged, either of them should fix #3407.

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