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 MAM cache name #3594

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Fix MAM cache name #3594

merged 1 commit into from
Mar 16, 2022

Conversation

NelsonVides
Copy link
Collaborator

When mod_mam_cache_user checks its cache, it gives its own module name
to mongoose_user_cache so that this one fetches the config to see if it
has configured its own cache or is reusing some other module's cache.
The problem is that mongoose_user_cache will check for the module key,
but it the current implementation, we are hiding it behind a cache key
to contain the cache config.

So by just moving the config a level up, mongoose_user_cache can find it.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 15, 2022

small_tests_24 / small_tests / 11186ec
Reports root / small


small_tests_23 / small_tests / 11186ec
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 11186ec
Reports root/ big
OK: 2822 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 11186ec
Reports root/ big
OK: 2822 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 11186ec
Reports root/ big
OK: 2805 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 11186ec
Reports root/ big
OK: 2822 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 11186ec
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 11186ec
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 11186ec
Reports root/ big
OK: 1546 / Failed: 0 / User-skipped: 358 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 11186ec
Reports root/ big
OK: 1853 / Failed: 0 / User-skipped: 366 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 11186ec
Reports root/ big
OK: 3196 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 11186ec
Reports root/ big
OK: 3196 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 11186ec
Reports root/ big
OK: 3191 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 11186ec
Reports root/ big
OK: 3196 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 11186ec
Reports root/ big
OK: 1696 / Failed: 0 / User-skipped: 365 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #3594 (f1b3b14) into master (3a875ec) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3594      +/-   ##
==========================================
+ Coverage   80.84%   80.86%   +0.01%     
==========================================
  Files         426      426              
  Lines       32379    32379              
==========================================
+ Hits        26177    26182       +5     
+ Misses       6202     6197       -5     
Impacted Files Coverage Δ
src/mam/mod_mam_cache_user.erl 100.00% <100.00%> (ø)
src/mam/mod_mam_meta.erl 97.40% <100.00%> (+1.29%) ⬆️
...rc/smart_markers/mod_smart_markers_rdbms_async.erl 88.88% <0.00%> (-3.71%) ⬇️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 71.69% <0.00%> (-1.89%) ⬇️
src/offline/mod_offline.erl 76.08% <0.00%> (-1.09%) ⬇️
src/pubsub/mod_pubsub.erl 73.13% <0.00%> (-0.06%) ⬇️
src/pubsub/mod_pubsub_db_mnesia.erl 92.85% <0.00%> (+0.42%) ⬆️
src/domain/mongoose_domain_loader.erl 90.17% <0.00%> (+0.89%) ⬆️
src/mam/mod_mam_elasticsearch_arch.erl 86.84% <0.00%> (+1.75%) ⬆️
... and 3 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 3a875ec...f1b3b14. Read the comment docs.

When mod_mam_cache_user checks its cache, it gives its own module name
to mongoose_user_cache so that this one fetches the config to see if it
has configured its own cache or is reusing some other module's cache.
The problem is that mongoose_user_cache will check for the module key,
but it the current implementation, we are hiding it behind a cache key
to contain the cache config.

So by just moving the config a level up, mongoose_user_cache can find it.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 15, 2022

small_tests_24 / small_tests / f1b3b14
Reports root / small


small_tests_23 / small_tests / f1b3b14
Reports root / small


dynamic_domains_mysql_redis_24 / mysql_redis / f1b3b14
Reports root/ big
OK: 2805 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / f1b3b14
Reports root/ big
OK: 2822 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / f1b3b14
Reports root/ big
OK: 2822 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / f1b3b14
Reports root/ big
OK: 2822 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / f1b3b14
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / f1b3b14
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / f1b3b14
Reports root/ big
OK: 1546 / Failed: 0 / User-skipped: 358 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / f1b3b14
Reports root/ big
OK: 3196 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / f1b3b14
Reports root/ big
OK: 1853 / Failed: 0 / User-skipped: 366 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / f1b3b14
Reports root/ big
OK: 3196 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / f1b3b14
Reports root/ big
OK: 3196 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / f1b3b14
Reports root/ big
OK: 3191 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / f1b3b14
Reports root/ big
OK: 1696 / Failed: 0 / User-skipped: 365 / Auto-skipped: 0

@arcusfelis arcusfelis merged commit 21761f4 into master Mar 16, 2022
@arcusfelis arcusfelis deleted the fix_mam_cache branch March 16, 2022 09:25
@Premwoik Premwoik added this to the 5.1.0 milestone May 25, 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.

4 participants