Page MenuHomePhorge
Feed Search

Oct 25 2022

kamil committed rCOMMc2969dbdabab: [native/sqlite] introduce function to set database version.
Oct 25 2022, 7:46 AM
kamil closed D5375: [native/sqlite] introduce function to get database version.
Oct 25 2022, 7:46 AM
kamil committed rCOMM1824b7d8ba49: [native/sqlite] introduce function to get database version.
Oct 25 2022, 7:46 AM

Oct 24 2022

kamil added 2 blocking reviewer(s) for D5377: [native/sqlite] refactor code to perform migration inside one transaction: tomek, atul.
Oct 24 2022, 11:41 AM
kamil added inline comments to D5453: [web] Added show/hide password button..
Oct 24 2022, 9:18 AM
kamil requested changes to D5453: [web] Added show/hide password button..
In D5453#161021, @tomek wrote:

@kamil could you give it a review and add me as blocking when the diff is ready?

Oct 24 2022, 9:05 AM

Oct 21 2022

kamil requested review of D5377: [native/sqlite] refactor code to perform migration inside one transaction.

(If the app will run into issues like those described in previous links in this time another thread could already updated the version).
If another thread will do it within getting the version and performing migration (not in the transaction) we do not run into issues because setting journal mode is an idempotent operation.

Such scenario is currently impossible. Different threads access database via GlobalDBSingleton. They put tasks (in the form of C++ lambdas) to the queue, and dedicated database thread executes them in FIFO manner (by consuming queue). This way tasks scheduled to GlobalDBSingleton are executed atomically. SQLiteQueryExecutor is thread_local, so every thread will instantiate its own SQLiteQueryExecutor (and hence schedule migrate() to be executed on GlobalDBSingleton), but due to atomicity of database tasks it is not possible that some migrations will be performed by one's thread SQLiteQueryExecutor constructor while others by another's.

Those changes look OK, but we must be aware that they do not resolve potential issue but rather prepare code to a situation if we enable multithreaded access to SQLite and resign from GlobalDBSingleton at all.
Requesting changes to make sure this comment is read and addressed.

Oct 21 2022, 9:03 AM
kamil requested review of D5376: [native/sqlite] introduce function to set database version.
Oct 21 2022, 8:48 AM
kamil requested review of D5379: [native/sqlite] introduce function to set up database.
In D5379#160340, @atul wrote:

Back to your queue until D5378 is addressed (let me know if the issues I'm seeing aren't accurate though)

Oct 21 2022, 8:39 AM
kamil requested review of D5378: [native/sqlite] introduce function to create database.
In D5378#160333, @atul wrote:

I tried the following on my local machine

  1. Created a SQLite3 DB file
  2. Ran the query

and got the following:

Query 1 ERROR: no such table: main.messages

After running it again, I got the following:

Query 1 OK

I tried this twice to make sure the issue was reproducible. It looks like this query will always fail the first time it's run?

Feel free to re-request review if there's something I'm missing or the results I'm seeing are inaccurate.

Oct 21 2022, 8:39 AM
kamil requested review of D5377: [native/sqlite] refactor code to perform migration inside one transaction.
Oct 21 2022, 8:09 AM
kamil added a comment to D5377: [native/sqlite] refactor code to perform migration inside one transaction.
In D5377#160412, @atul wrote:

Does the following stack of two commits achieve both goals D5440 D5441?

Oct 21 2022, 8:09 AM
kamil requested review of D5376: [native/sqlite] introduce function to set database version.

Same concerns and questions as in D5375.

Oct 21 2022, 7:18 AM
kamil requested review of D5375: [native/sqlite] introduce function to get database version.

In the future there will be a need to get the database version in different places, that being said extracting logic to separate function.

What do you mean by "other" places? If you think about calling this function from different places inside SQliteQueryExecutor then this differential is fine and ready to be accepted. But if you want to call this function somewhere in C++ outside of SQliteQueryExecutor, then we have a few problems:

  1. This function is not defined in SQLiteQueryExecutor.h neither as a class method nor free function. So we are not able to call it outside of SQLIteQueryExecutor
  2. If we want to call this function outside of SQLiteQueryExecutor.h should it be free function or method? If method then we also need to introduce it as virtual in DatabaseQueryExecutor abstract class

I need your answer regarding "other places" in the code we want to call this function from and your thoughts on 1 and 2 if you want to call this function outside of SQLiteQueryExecutor.

Oct 21 2022, 7:15 AM
kamil abandoned D5437: [native] remove `grpc_client` folder on `clean-commoncpp` script.
Oct 21 2022, 7:06 AM

Oct 20 2022

kamil requested review of D5377: [native/sqlite] refactor code to perform migration inside one transaction.
Oct 20 2022, 3:44 PM
kamil added a comment to D5377: [native/sqlite] refactor code to perform migration inside one transaction.
In D5377#160227, @atul wrote:
  1. We want to ROLLBACK when a migration fails.

I think we could just do something like this: https://phab.comm.dev/D5433?

Oct 20 2022, 3:42 PM
kamil published D5437: [native] remove `grpc_client` folder on `clean-commoncpp` script for review.
Oct 20 2022, 3:13 PM
kamil requested review of D5379: [native/sqlite] introduce function to set up database.
In D5379#159648, @atul wrote:

Back to your queue until D5377 is updated

Oct 20 2022, 8:11 AM
kamil added a reviewer for D5378: [native/sqlite] introduce function to create database: atul.
Oct 20 2022, 8:10 AM
kamil added a comment to D5377: [native/sqlite] refactor code to perform migration inside one transaction.
In D5377#159644, @atul wrote:

I think this needs to be cleaned up some more before it's ready for review

Oct 20 2022, 8:00 AM
kamil updated the diff for D5377: [native/sqlite] refactor code to perform migration inside one transaction.

remove unnecessary line

Oct 20 2022, 7:52 AM
kamil added a comment to D5375: [native/sqlite] introduce function to get database version.
In D5375#159611, @atul wrote:

Looks good, can we maybe move get_database_version() closer to where it's used though (it's like 200 lines above the only usage)? Feel free to leave as is if you had a reason to place it where you did.

Oct 20 2022, 7:35 AM

Oct 17 2022

kamil published D5379: [native/sqlite] introduce function to set up database for review.
Oct 17 2022, 1:43 PM
kamil published D5378: [native/sqlite] introduce function to create database for review.
Oct 17 2022, 1:42 PM
kamil published D5377: [native/sqlite] refactor code to perform migration inside one transaction for review.
Oct 17 2022, 1:41 PM
kamil published D5376: [native/sqlite] introduce function to set database version for review.
Oct 17 2022, 1:40 PM
kamil published D5375: [native/sqlite] introduce function to get database version for review.
Oct 17 2022, 1:39 PM

Oct 12 2022

kamil added a comment to D5312: [keyserver] update acknowledgment table in login was performed from proper source.

setting version for 99999 because sending source was not released yet and not sure which version to use

Oct 12 2022, 10:50 AM
kamil updated the diff for D5312: [keyserver] update acknowledgment table in login was performed from proper source.

check for falsey input on older client

Oct 12 2022, 10:48 AM
kamil added inline comments to D5311: [keyserver] add logic to update acknowledgment table.
Oct 12 2022, 10:17 AM
kamil updated the diff for D5311: [keyserver] add logic to update acknowledgment table.

use ON DUPLICATE KEY, use map, add newline

Oct 12 2022, 10:12 AM
kamil added inline comments to D5310: [keyserver] add script to force users to acknowledge updated policy.
Oct 12 2022, 10:06 AM
kamil updated the diff for D5310: [keyserver] add script to force users to acknowledge updated policy.

fix formating, add new line, remove const

Oct 12 2022, 10:01 AM
kamil added inline comments to D5309: [keyserver] add script to populate `policy_acknowledgments` table.
Oct 12 2022, 9:58 AM
kamil updated the diff for D5309: [keyserver] add script to populate `policy_acknowledgments` table.

fix import

Oct 12 2022, 9:52 AM
kamil updated the diff for D5309: [keyserver] add script to populate `policy_acknowledgments` table.

fix spacing issue, add new line, remove const

Oct 12 2022, 9:46 AM
kamil added a comment to D5307: [keyserver] add migration to create `policy_acknowledgments` table.

thanks for responding to comments @ashoat!

Oct 12 2022, 9:43 AM
kamil updated the diff for D5307: [keyserver] add migration to create `policy_acknowledgments` table.

update query formating

Oct 12 2022, 9:41 AM
kamil added inline comments to D5306: [lib] add legal policies list.
Oct 12 2022, 9:39 AM
kamil updated the diff for D5306: [lib] add legal policies list.

add new line below // @flow

Oct 12 2022, 9:37 AM

Oct 6 2022

kamil closed D5292: [native/sqlite] set `journal_mode` on fresh install.
Oct 6 2022, 3:03 PM
kamil committed rCOMM19a81c3ea6ac: [native/sqlite] set `journal_mode` on fresh install.
Oct 6 2022, 3:03 PM
kamil published D5312: [keyserver] update acknowledgment table in login was performed from proper source for review.
Oct 6 2022, 11:51 AM
kamil published D5311: [keyserver] add logic to update acknowledgment table for review.
Oct 6 2022, 11:51 AM
kamil published D5310: [keyserver] add script to force users to acknowledge updated policy for review.
Oct 6 2022, 11:51 AM
kamil published D5309: [keyserver] add script to populate `policy_acknowledgments` table for review.
Oct 6 2022, 11:50 AM
kamil published D5308: [keyserver] add code to create `policy_acknowledgments` table on database setup for review.
Oct 6 2022, 11:50 AM
kamil published D5307: [keyserver] add migration to create `policy_acknowledgments` table for review.
Oct 6 2022, 11:50 AM
kamil published D5306: [lib] add legal policies list for review.
Oct 6 2022, 11:49 AM
kamil updated the diff for D5291: [native/sqlite] check for error while updating db version.

update code structure

Oct 6 2022, 7:32 AM

Oct 5 2022

kamil added inline comments to D5291: [native/sqlite] check for error while updating db version.
Oct 5 2022, 1:51 PM
kamil added a comment to D5292: [native/sqlite] set `journal_mode` on fresh install.

If we set journal mode here do we also need to set it when running migrations? Isn't calling enable_write_ahead_logging_mode redundant now? I just want to make sure we do not perform redundant operations.

Oct 5 2022, 1:32 PM
kamil updated the diff for D5292: [native/sqlite] set `journal_mode` on fresh install.

set journal_mode using sqlite_orm only on fresh install

Oct 5 2022, 12:59 PM

Oct 4 2022

kamil updated the diff for D5291: [native/sqlite] check for error while updating db version.

update ROLLBACK

Oct 4 2022, 3:49 PM
kamil updated the diff for D5290: [native/sqlite] add `IF NOT EXISTS` constraint to migrations.

add IF NOT EXISTS for messages_idx_thread_time

Oct 4 2022, 3:44 PM
kamil added inline comments to D5292: [native/sqlite] set `journal_mode` on fresh install.
Oct 4 2022, 3:38 PM
kamil updated the diff for D5292: [native/sqlite] set `journal_mode` on fresh install.

set journal_modeusing sqlite_orm

Oct 4 2022, 3:26 PM
kamil published D5292: [native/sqlite] set `journal_mode` on fresh install for review.
Oct 4 2022, 1:21 PM
kamil added inline comments to D5291: [native/sqlite] check for error while updating db version.
Oct 4 2022, 12:05 PM
kamil added inline comments to D5290: [native/sqlite] add `IF NOT EXISTS` constraint to migrations.
Oct 4 2022, 11:37 AM
kamil published D5291: [native/sqlite] check for error while updating db version for review.
Oct 4 2022, 10:01 AM
kamil published D5290: [native/sqlite] add `IF NOT EXISTS` constraint to migrations for review.
Oct 4 2022, 10:01 AM

Oct 3 2022

kamil closed D5260: [keyserver] add `source` field to `LogInRequest`.
Oct 3 2022, 4:03 PM
kamil closed D5259: [web/native/lib] make `source` param required on log in.
Oct 3 2022, 4:03 PM
kamil committed rCOMMf551b131b6a5: [keyserver] add `source` field to `LogInRequest`.
Oct 3 2022, 4:03 PM
kamil committed rCOMMaabaad4f147e: [web/native/lib] make `source` param required on log in.
Oct 3 2022, 4:03 PM
kamil closed D5258: [native/keyserver] add `source` param on log in from native.
Oct 3 2022, 4:03 PM
kamil closed D5257: [web/keyserver] add `source` param on log in from web.
Oct 3 2022, 4:03 PM
kamil committed rCOMMf6382b311477: [native/keyserver] add `source` param on log in from native.
Oct 3 2022, 4:02 PM
kamil committed rCOMM7b6fbc5c633b: [web/keyserver] add `source` param on log in from web.
Oct 3 2022, 4:02 PM
kamil closed D5256: [lib] add action sources options for log in from UI.
Oct 3 2022, 4:02 PM
kamil committed rCOMM14b00979d9f2: [lib] add action sources options for log in from UI.
Oct 3 2022, 4:02 PM

Sep 30 2022

kamil added inline comments to D5259: [web/native/lib] make `source` param required on log in.
Sep 30 2022, 8:52 AM
kamil updated the test plan for D5259: [web/native/lib] make `source` param required on log in.
Sep 30 2022, 8:49 AM

Sep 29 2022

kamil added a comment to D5260: [keyserver] add `source` field to `LogInRequest`.

This is a really bad idea. You're going to cause all existing native clients to crash when they attempt to log in.

Sep 29 2022, 3:10 PM
kamil retitled D5260: [keyserver] add `source` field to `LogInRequest` from [keyserver] make `source` param required on log in
Sep 29 2022, 3:07 PM
kamil updated the diff for D5260: [keyserver] add `source` field to `LogInRequest`.

leave sorce optional on keyserver

Sep 29 2022, 3:03 PM
kamil published D5260: [keyserver] add `source` field to `LogInRequest` for review.
Sep 29 2022, 11:44 AM
kamil published D5259: [web/native/lib] make `source` param required on log in for review.
Sep 29 2022, 11:44 AM
kamil published D5258: [native/keyserver] add `source` param on log in from native for review.
Sep 29 2022, 11:43 AM
kamil published D5257: [web/keyserver] add `source` param on log in from web for review.
Sep 29 2022, 11:43 AM
kamil published D5256: [lib] add action sources options for log in from UI for review.
Sep 29 2022, 11:43 AM
kamil closed D5228: [lib] pass entire `loginInInfo` to server call.
Sep 29 2022, 8:11 AM
kamil closed D5227: [keyserver] allow `source` field in log_in endpoint validation.
Sep 29 2022, 8:11 AM
kamil committed rCOMMc91d68d06509: [keyserver] allow `source` field in log_in endpoint validation.
Sep 29 2022, 8:11 AM
kamil committed rCOMMc284bf799255: [lib] pass entire `loginInInfo` to server call.
Sep 29 2022, 8:11 AM
kamil closed D5226: [lib/native] refactor `LogInActionSource` type to use object pattern.
Sep 29 2022, 8:11 AM
kamil committed rCOMM4d595131fb91: [lib/native] refactor `LogInActionSource` type to use object pattern.
Sep 29 2022, 8:11 AM

Sep 28 2022

kamil added a comment to D5048: [native] Implement darker color tint to block quote container.

I left some comments but it'll be good if one of the senior reviewers take a look if my suggestions were correct.

Sep 28 2022, 11:16 AM
kamil updated the diff for D5227: [keyserver] allow `source` field in log_in endpoint validation.

rebase

Sep 28 2022, 10:05 AM
kamil updated the diff for D5226: [lib/native] refactor `LogInActionSource` type to use object pattern.

rebase

Sep 28 2022, 10:01 AM
kamil updated the diff for D5226: [lib/native] refactor `LogInActionSource` type to use object pattern.

LogInActionSourceType -> LogInActionSource

Sep 28 2022, 9:56 AM
kamil updated the diff for D5226: [lib/native] refactor `LogInActionSource` type to use object pattern.

clean imports, rename constants

Sep 28 2022, 9:37 AM
kamil closed D5158: [native/sqlite] infer db schema from `sqlite_orm`.
Sep 28 2022, 9:10 AM
kamil committed rCOMMccc4e5f12d6c: [native/sqlite] infer db schema from `sqlite_orm`.
Sep 28 2022, 9:10 AM
kamil closed D5148: [native/sqlite] add missing unique and primary_key constraints to `sqlite_orm` structure.
Sep 28 2022, 9:10 AM
kamil closed D5146: [native/sqlite] add `NOT NULL` constraint to `metadata` table.
Sep 28 2022, 9:10 AM
kamil closed D5150: [native/sqlite] add missing indexes to `sqlite_orm` structure.
Sep 28 2022, 9:10 AM
kamil committed rCOMM7893080409df: [native/sqlite] add missing unique and primary_key constraints to `sqlite_orm`….
Sep 28 2022, 9:10 AM