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)
Mon, Dec 23, 4:17 PM
Unknown Object (File)
Mon, Dec 23, 4:17 PM
Unknown Object (File)
Mon, Dec 23, 4:17 PM
Unknown Object (File)
Thu, Dec 19, 11:34 PM
Unknown Object (File)
Wed, Dec 4, 5:54 PM
Unknown Object (File)
Nov 22 2024, 9:18 AM
Unknown Object (File)
Nov 10 2024, 10:32 AM
Unknown Object (File)
Nov 9 2024, 2: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
Branch
publish-broadcasting-2
Lint
No Lint Coverage
Unit
No Test Coverage

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