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(WC)_: Create indexes for WC queries #5989

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

alexjba
Copy link
Contributor

@alexjba alexjba commented Oct 24, 2024

Create the indexes needed for WalletConnect queries based on .expert recommendations.

Fixing: status-im/status-desktop#14975

@alexjba alexjba requested review from a team, dlipicar and Cuteivist and removed request for a team October 24, 2024 14:13
@status-im-auto
Copy link
Member

status-im-auto commented Oct 24, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d128fad #1 2024-10-24 14:18:21 ~4 min linux 📦zip
✔️ d128fad #1 2024-10-24 14:18:26 ~4 min ios 📦zip
✔️ d128fad #1 2024-10-24 14:19:35 ~6 min android 📦aar
✔️ d128fad #1 2024-10-24 14:20:06 ~6 min tests-rpc 📄log
✖️ d128fad #1 2024-10-24 14:47:51 ~34 min tests 📄log
✔️ d128fad #2 2024-10-25 06:57:17 ~30 min tests 📄log

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.48%. Comparing base (c72f491) to head (d128fad).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5989      +/-   ##
===========================================
- Coverage    47.49%   47.48%   -0.02%     
===========================================
  Files          849      849              
  Lines       138606   138606              
===========================================
- Hits         65836    65813      -23     
- Misses       64984    64996      +12     
- Partials      7786     7797      +11     
Flag Coverage Δ
functional 10.20% <ø> (+0.01%) ⬆️
unit 46.97% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 24 files with indirect coverage changes

Copy link
Contributor

@saledjenic saledjenic left a comment

Choose a reason for hiding this comment

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

@alexjba do we really need this indexing?
Wondering now, how many rows do we expect from an average user?
Do we do any table cleaning once the session expires?

@alexjba
Copy link
Contributor Author

alexjba commented Nov 1, 2024

@alexjba do we really need this indexing? Wondering now, how many rows do we expect from an average user? Do we do any table cleaning once the session expires?

We don't do any cleaning! And then it could become an issue if the query is not optimized. Moreover, it adds some weight to this decision when we consider that everything is processed synchronously.

Now the reasoning why we never delete sessions is another topic that should be discussed soon. What I've found so far is that this was an informed decision.

The sessions requests from dApps are persisted for offline dApps display and to have history later on when implemented in UX.
https://www.notion.so/Wallet-Connect-Desktop-handover-73a52b2de7cf45b3af2905dfe164cd76?pvs=4#600332b3cce94e92815e4e4173f7aea6

@saledjenic
Copy link
Contributor

saledjenic commented Nov 1, 2024

But the session has its own expiration date, I don't think that we need to keep an expired session in db, but agree we should discuss that.

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