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: get conversation members is causing a full table scan #1891

Merged

Conversation

MohamadJaara
Copy link
Member


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

adding % before and after a search quarry will cause it to ignore any indexing and do a full table scan

Solutions

there is not reason anymore for the search by conversation id so revert it to a good old =

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 17, 2023

Unit Test Results

   326 files   -   68     326 suites   - 68   22s ⏱️ - 1m 15s
1 806 tests  - 298  1 737 ✔️  - 280  69 💤  - 18  0 ±0 

Results for commit 181bae7. ± Comparison against base commit 26c567c.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

Codecov Report

Merging #1891 (ef2ce26) into develop (2c1b8fa) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##             develop    #1891      +/-   ##
=============================================
- Coverage      54.58%   54.58%   -0.01%     
  Complexity      1620     1620              
=============================================
  Files           1008     1008              
  Lines          37006    37006              
  Branches        3331     3331              
=============================================
- Hits           20201    20199       -2     
- Misses         15450    15451       +1     
- Partials        1355     1356       +1     
Impacted Files Coverage Δ
...om/wire/kalium/persistence/dao/member/MemberDAO.kt 71.42% <100.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c1b8fa...ef2ce26. Read the comment docs.

@MohamadJaara MohamadJaara force-pushed the fix/get_conversation_from_db_causing_a_full_table_scan branch from e406648 to ef2ce26 Compare July 17, 2023 12:46
@MohamadJaara MohamadJaara requested review from yamilmedina, a team, typfel, alexandreferris, borichellow and saleniuk and removed request for a team July 17, 2023 14:13
@MohamadJaara MohamadJaara enabled auto-merge (squash) July 17, 2023 15:37
Copy link
Contributor

@yamilmedina yamilmedina left a comment

Choose a reason for hiding this comment

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

🔥 Good catch ! Just leaving a comment here, so we don't forget to double-check in case of regression for calling in federated environments:

  • Conversation with members of different backends.
  • Conversation with users of same team.

@MohamadJaara MohamadJaara merged commit 0979362 into develop Jul 17, 2023
9 checks passed
@MohamadJaara MohamadJaara deleted the fix/get_conversation_from_db_causing_a_full_table_scan branch July 17, 2023 15:56
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.

5 participants