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/inbox #3132

Merged
merged 10 commits into from
May 31, 2021
Merged

Multitenancy/inbox #3132

merged 10 commits into from
May 31, 2021

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented May 26, 2021

This PR attempts to prepare inbox to be multitenancy ready.

NOTE, important TODOs for the near future:

  • Muc, muclight, and pools, aren't multitenancy ready yet.
  • Pools need to be called by their hosttype, not their lserver.

@codecov
Copy link

codecov bot commented May 26, 2021

Codecov Report

Merging #3132 (661edf9) into master (2a0d26a) will increase coverage by 0.01%.
The diff coverage is 88.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3132      +/-   ##
==========================================
+ Coverage   79.45%   79.46%   +0.01%     
==========================================
  Files         395      395              
  Lines       32170    32175       +5     
==========================================
+ Hits        25560    25568       +8     
+ Misses       6610     6607       -3     
Impacted Files Coverage Δ
src/ejabberd_sm.erl 84.51% <ø> (+0.33%) ⬆️
src/inbox/mod_inbox_entries.erl 98.33% <ø> (ø)
src/ejabberd_c2s.erl 89.00% <66.66%> (-0.28%) ⬇️
src/inbox/mod_inbox.erl 90.14% <90.00%> (-0.36%) ⬇️
src/inbox/mod_inbox_rdbms.erl 90.85% <100.00%> (ø)
src/mongoose_tcp_listener.erl 76.59% <0.00%> (-4.26%) ⬇️
src/cassandra/mongoose_cassandra_worker.erl 70.75% <0.00%> (-0.48%) ⬇️
src/mod_muc_log.erl 77.72% <0.00%> (ø)
... 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 2a0d26a...661edf9. Read the comment docs.

@NelsonVides NelsonVides changed the title [WIP] Multitenancy/inbox Multitenancy/inbox May 28, 2021
@NelsonVides NelsonVides marked this pull request as ready for review May 28, 2021 11:58
Comment on lines 87 to 88
start_running(Config) ->
Domain = ct:get_config({hosts, mim, domain}),
HostType = domain_helper:host_type(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't stop_running/2 also be changed to use HostType?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, good one.

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 changes looks good, my main concern is that all the execute_* functions are not converted to host types yet.

big_tests/test.config Outdated Show resolved Hide resolved
big_tests/tests/domain_helper.erl Outdated Show resolved Hide resolved
big_tests/tests/inbox_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/inbox_extensions_SUITE.erl Outdated Show resolved Hide resolved
src/inbox/mod_inbox.erl Outdated Show resolved Hide resolved
@NelsonVides
Copy link
Collaborator Author

@chrzaszcz Changes applied. When it comes to the execute queries, in reality the host passed is ignored later on, so it doesn't make any difference yet, until we can really configure more than one rdbms pool. So for now that's a big todo for the task of adapting rdbms pools.

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.

We decided with @NelsonVides that adapting the backends to work with host types will be done in a follow-up PR.

@chrzaszcz chrzaszcz merged commit fa8766c into master May 31, 2021
@chrzaszcz chrzaszcz deleted the multitenancy/inbox branch May 31, 2021 12:48
@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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants