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)
Wed, Jun 19, 9:12 AM
Unknown Object (File)
Mon, Jun 10, 10:36 AM
Unknown Object (File)
Sun, Jun 9, 9:12 PM
Unknown Object (File)
Sun, Jun 9, 7:52 AM
Unknown Object (File)
Thu, Jun 6, 1:47 PM
Unknown Object (File)
Thu, Jun 6, 1:15 AM
Unknown Object (File)
Fri, May 31, 7:32 PM
Unknown Object (File)
Fri, May 31, 3:03 PM
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