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

Multitenancy for ejabberd users #3135

Merged
merged 6 commits into from
May 28, 2021
Merged

Conversation

NelsonVides
Copy link
Collaborator

This erases ejabberd_users and creates a new module called mongoose_users that implements pretty much the same cache idea, but creates a table per host_type, and implements the remove_domain hook.

It also chooses to extract the host_type from the accumulator in some places where we can be sure we do have a host_type, like, when run inside user_send_packet, filter_local_packet, or iq handlers.

@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #3135 (c51ebed) into master (e55fa8e) will increase coverage by 0.02%.
The diff coverage is 94.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3135      +/-   ##
==========================================
+ Coverage   79.46%   79.49%   +0.02%     
==========================================
  Files         395      395              
  Lines       32172    32170       -2     
==========================================
+ Hits        25565    25572       +7     
+ Misses       6607     6598       -9     
Impacted Files Coverage Δ
src/mongoose_hooks.erl 92.30% <ø> (ø)
src/mongoose_users.erl 93.02% <93.02%> (ø)
src/auth/ejabberd_auth.erl 83.87% <100.00%> (ø)
src/ejabberd_app.erl 93.75% <100.00%> (ø)
...t_pusher/mod_event_pusher_push_plugin_defaults.erl 93.10% <100.00%> (+0.12%) ⬆️
src/inbox/mod_inbox.erl 90.50% <100.00%> (+0.09%) ⬆️
src/mam/mod_mam.erl 89.15% <100.00%> (+0.05%) ⬆️
src/muc_light/mod_muc_light.erl 84.54% <100.00%> (ø)
src/pubsub/node_hometree.erl 77.77% <0.00%> (-5.56%) ⬇️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 71.69% <0.00%> (-1.89%) ⬇️
... and 9 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 e55fa8e...c51ebed. Read the comment docs.

@NelsonVides NelsonVides force-pushed the multitenancy/ejabberd_users branch 2 times, most recently from dba715b to 5a6b556 Compare May 27, 2021 22:32
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 fine for now, mongoose_users must be reimplemented with the proper caching solution once we pick one.

@DenysGonchar DenysGonchar merged commit 2a0d26a into master May 28, 2021
@DenysGonchar DenysGonchar deleted the multitenancy/ejabberd_users branch May 28, 2021 07:28
@Premwoik Premwoik added this to the 5.0.0 milestone Oct 5, 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.

None yet

3 participants