gristlabs_grist-core/app/gen-server/lib
Jarosław Sadziński 0ca70e9d43 (core) Fixing lock issues and reverting back to single connection.
Summary:
Removing `createNewConnection` method that was used in tests to create a
"scoped" version of `HomeDbManager`. Currently this won't work as there are
many methods (like `Users.findOne`) that are using the default (global) connection.

Additionally `HomeDBManger` had couple of bugs that were causing locks, which
manifested themselves in postgresql tests (that are not serializing transactions).
Repository methods like `Users.findOne` or `user.save()`, even when wrapped in
transaction were using a separate connection from the pool (and a separate
transaction).

Some tests in `UsersManager` are still skipped or refactored, as sinon's `fakeTimers`
doesn't work well with postgresql driver (which is using `setTimout` a lot).

Date mappings in `User` entity were fixed, they were using `SQLite` configuration only,
which caused problems with postgresql database.

Test Plan: Refactored.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4342
2024-09-11 20:48:52 +02:00
..
homedb (core) Fixing lock issues and reverting back to single connection. 2024-09-11 20:48:52 +02:00
Activations.ts Move HomeDBManager to gen-server/lib/homedb (#1076) 2024-07-05 16:02:39 +02:00
DocApiForwarder.ts Move HomeDBManager to gen-server/lib/homedb (#1076) 2024-07-05 16:02:39 +02:00
DocWorkerMap.ts Shutdown Doc worker when it is not considered as available in Redis #831 (#856) 2024-04-04 10:25:42 -04:00
Doom.ts Move HomeDBManager to gen-server/lib/homedb (#1076) 2024-07-05 16:02:39 +02:00
Housekeeper.ts Move HomeDBManager to gen-server/lib/homedb (#1076) 2024-07-05 16:02:39 +02:00
NotifierTypes.ts (core) move apiserver tests to core, disentangling notifier+billing parts 2023-12-26 08:43:12 -05:00
Permissions.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
scrubUserFromOrg.ts (core) move home server into core 2020-07-21 20:39:10 -04:00
TypeORMPatches.ts (core) Add options to /status health-check endpoints to check DB and Redis liveness. 2023-10-02 14:41:04 -04:00
Usage.ts Move HomeDBManager to gen-server/lib/homedb (#1076) 2024-07-05 16:02:39 +02:00
values.ts (core) move home server into core 2020-07-21 20:39:10 -04:00