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 modMucMamFlushed metric #3023

Merged
merged 1 commit into from
Feb 5, 2021
Merged

Fix modMucMamFlushed metric #3023

merged 1 commit into from
Feb 5, 2021

Conversation

arcusfelis
Copy link
Contributor

This PR addresses "modMucMamFlushed is updated but not created".

Proposed changes include:

  • modMucMamFlushed is created now

@mongoose-im
Copy link
Collaborator

mongoose-im commented Feb 4, 2021

9070.1 / Erlang 23.0.3 / small_tests / 7e23741
Reports root / small


9070.2 / Erlang 23.0.3 / internal_mnesia / 7e23741
Reports root/ big
OK: 1503 / Failed: 0 / User-skipped: 161 / Auto-skipped: 0


9070.4 / Erlang 23.0.3 / mysql_redis / 7e23741
Reports root/ big
OK: 2766 / Failed: 0 / User-skipped: 234 / Auto-skipped: 0


9070.3 / Erlang 23.0.3 / odbc_mssql_mnesia / 7e23741
Reports root/ big
OK: 2771 / Failed: 0 / User-skipped: 229 / Auto-skipped: 0


9070.7 / Erlang 23.0.3 / elasticsearch_and_cassandra_mnesia / 7e23741
Reports root/ big
OK: 331 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


9070.5 / Erlang 23.0.3 / riak_mnesia / 7e23741
Reports root/ big
OK: 1629 / Failed: 0 / User-skipped: 181 / Auto-skipped: 0


9070.6 / Erlang 23.0.3 / ldap_mnesia / 7e23741
Reports root/ big
OK: 1405 / Failed: 0 / User-skipped: 259 / Auto-skipped: 0


9070.9 / Erlang 22.3 / pgsql_mnesia / 7e23741
Reports root/ big / small
OK: 2784 / Failed: 0 / User-skipped: 216 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #3023 (af7469e) into master (c7935ad) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3023      +/-   ##
==========================================
+ Coverage   78.53%   78.57%   +0.04%     
==========================================
  Files         376      376              
  Lines       31488    31488              
==========================================
+ Hits        24729    24743      +14     
+ Misses       6759     6745      -14     
Impacted Files Coverage Δ
src/metrics/mongoose_metrics_mam_hooks.erl 86.66% <ø> (+6.66%) ⬆️
src/muc_light/mod_muc_light.erl 82.96% <0.00%> (-0.88%) ⬇️
src/ejabberd_sm.erl 76.07% <0.00%> (-0.31%) ⬇️
src/mod_roster.erl 77.49% <0.00%> (-0.24%) ⬇️
src/mod_muc_room.erl 77.54% <0.00%> (-0.06%) ⬇️
src/mod_muc_log.erl 77.72% <0.00%> (ø)
src/pubsub/mod_pubsub_db_mnesia.erl 92.82% <0.00%> (+0.42%) ⬆️
src/ejabberd_s2s_out.erl 58.35% <0.00%> (+0.45%) ⬆️
src/mam/mod_mam_utils.erl 89.64% <0.00%> (+0.64%) ⬆️
src/metrics/mongoose_metrics.erl 95.36% <0.00%> (+0.66%) ⬆️
... 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 c7935ad...af7469e. Read the comment docs.

@chrzaszcz
Copy link
Member

chrzaszcz commented Feb 5, 2021

This cannot work because the hook is not added anywhere in the code, see mongoose_metrics_mam_hooks:get_hooks/1

Could you:

  • Make the code actually update the metric :-)
  • Make the 1-to-1 and MUC versions consistent. One is using a hook and one is not, I think hooks are just not necessary here. Let the MUC version just update the metric directly like 1-to-1.
  • Not needed but nice to have: add a test for the metric - maybe we already have an async writer test and we could just check the metric there?

Finally, please test your changes - at least manually, thanks in advance!

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.

The comment above explains it.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Feb 5, 2021

9074.1 / Erlang 23.0.3 / small_tests / 34eb896
Reports root / small


9074.2 / Erlang 23.0.3 / internal_mnesia / 34eb896
Reports root/ big
OK: 1503 / Failed: 0 / User-skipped: 161 / Auto-skipped: 0


9074.4 / Erlang 23.0.3 / mysql_redis / 34eb896
Reports root/ big
OK: 2766 / Failed: 0 / User-skipped: 234 / Auto-skipped: 0


9074.7 / Erlang 23.0.3 / elasticsearch_and_cassandra_mnesia / 34eb896
Reports root/ big
OK: 331 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


9074.5 / Erlang 23.0.3 / riak_mnesia / 34eb896
Reports root/ big
OK: 1629 / Failed: 0 / User-skipped: 181 / Auto-skipped: 0


9074.6 / Erlang 23.0.3 / ldap_mnesia / 34eb896
Reports root/ big
OK: 1405 / Failed: 0 / User-skipped: 259 / Auto-skipped: 0


9074.9 / Erlang 22.3 / pgsql_mnesia / 34eb896
Reports root/ big / small
OK: 2784 / Failed: 0 / User-skipped: 216 / 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.

It works now, confirmed by a load test, good!

@chrzaszcz chrzaszcz merged commit 17d9faf into master Feb 5, 2021
@chrzaszcz chrzaszcz deleted the mu-fix-modMucMamFlushed branch February 5, 2021 13:12
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants