Page MenuHomePhabricator

[SQLite] recreate table for Outbound P2P messages
ClosedPublic

Authored by kamil on May 16 2024, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 2:07 PM
Unknown Object (File)
Wed, Oct 23, 7:23 PM
Unknown Object (File)
Wed, Oct 23, 7:21 PM
Unknown Object (File)
Fri, Oct 18, 10:29 PM
Unknown Object (File)
Sep 4 2024, 12:07 AM
Unknown Object (File)
Aug 27 2024, 6:15 PM
Unknown Object (File)
Aug 27 2024, 2:18 PM
Unknown Object (File)
Aug 25 2024, 12:46 AM
Subscribers

Details

Summary
  1. Updating table name to be more readable.
  2. Adding a column with status.

Note 1:
This table is empty in the current state so it's safe to just drop and create.

Note 2:
With the current design, we allow for ciphertext to be the empty string. This is the case when we need to send something to a peer but olm session not exist or is malformed. The alternative is making this field nullable, but this will make implementation more complex and will require a lot of additional code (mostly because of ENG-5719) so going for the empty string when ciphertext is missing.

Note 3:
We need a bit different API to this table - updated in the next diffs along with tests.

Depends on D12047

Test Plan
  1. Migration succeeded.
  2. Creating DB from scratch works.
  3. Tests

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil added inline comments.
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
2106–2107 ↗(On Diff #40281)
kamil published this revision for review.May 16 2024, 5:03 AM
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
2106–2107 ↗(On Diff #40281)

I'd prefer to keep the lines to 80 chars, but agree that the indentation of status is weird

web/shared-worker/queries/outbound-p2p-message-queries.test.js
99 ↗(On Diff #40281)

Was this change accidental?

This revision is now accepted and ready to land.May 17 2024, 3:30 AM
  • rebase
  • remove debug
  • keep line 80 chars