Page MenuHomePhabricator

[SQLite] recreate table for Outbound P2P messages
ClosedPublic

Authored by kamil on May 16 2024, 4:44 AM.
Tags
None
Referenced Files
F3346607: D12068.diff
Fri, Nov 22, 9:18 AM
Unknown Object (File)
Sun, Nov 10, 10:32 AM
Unknown Object (File)
Sat, Nov 9, 2:03 PM
Unknown Object (File)
Fri, Nov 8, 5:13 PM
Unknown Object (File)
Fri, Nov 1, 2:07 PM
Unknown Object (File)
Oct 23 2024, 7:23 PM
Unknown Object (File)
Oct 23 2024, 7:21 PM
Unknown Object (File)
Oct 18 2024, 10:29 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
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
kamil published this revision for review.May 16 2024, 5:03 AM
native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
2106–2107

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

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