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

Handle remove_domain in mod_inbox #3103

Merged
merged 5 commits into from
Apr 28, 2021
Merged

Conversation

arcusfelis
Copy link
Contributor

This PR addresses "tenant removal epic".

Proposed changes include:

  • Reorder indexes in the inbox table
  • Add a prepared query for removal
  • Add host_type type

@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #3103 (b9e337a) into master (160ba44) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3103      +/-   ##
==========================================
- Coverage   79.06%   79.04%   -0.02%     
==========================================
  Files         386      386              
  Lines       31830    31836       +6     
==========================================
  Hits        25165    25165              
- Misses       6665     6671       +6     
Impacted Files Coverage Δ
src/domain/mongoose_domain_api.erl 100.00% <ø> (ø)
src/mam/mod_mam_muc_rdbms_arch.erl 94.79% <ø> (ø)
src/mam/mod_mam_rdbms_arch.erl 49.47% <ø> (ø)
src/mongoose_hooks.erl 92.19% <ø> (ø)
src/mongooseim.erl 0.00% <ø> (ø)
src/inbox/mod_inbox.erl 90.35% <100.00%> (+0.61%) ⬆️
src/inbox/mod_inbox_rdbms.erl 90.85% <100.00%> (+0.22%) ⬆️
src/cassandra/mongoose_cassandra_worker.erl 70.75% <0.00%> (-2.36%) ⬇️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 71.69% <0.00%> (-1.89%) ⬇️
src/mod_bosh_socket.erl 77.95% <0.00%> (-0.94%) ⬇️
... 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 160ba44...b9e337a. Read the comment docs.

@@ -108,6 +108,30 @@ The command can be used instead:
And `mam` is used to run `mam_SUITE` suite only.


## Debugging big tests database
Copy link
Collaborator

Choose a reason for hiding this comment

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

absolutely love it.
it's needed probably twice a year but always time consuming to recall how to do it. thanks a lot

@@ -267,6 +271,12 @@ remove_user(Acc, User, Server) ->
mod_inbox_utils:clear_inbox(User, Server),
Acc.

-spec remove_domain(mongoose_acc:t(), mongooseim:host_type(), jid:lserver()) ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's not mongoose_acc:t(), MB we need some special type to highlight that Acc is not used!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, changed.

@@ -15,6 +15,8 @@
%%==============================================================================
-module(mongooseim).

-type host_type() :: binary().
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

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 good, just one minor comment regarding Acc type. But it can be changed later in the following PRs

@DenysGonchar DenysGonchar merged commit 15893fc into master Apr 28, 2021
@DenysGonchar DenysGonchar deleted the mu-delete-domain-fast-inbox branch April 28, 2021 23:01
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants