mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
29c2b35dcc
Summary: The `_repairWorkspaceGuests` method is slow for workspaces with large numbers of documents. It makes a query that produces a lot of rows. The query itself is tolerable, but TypeORM processing uses enough CPU to be a likely culprit in some production instability. This diff splits the query into two pieces that are logically independent, but which when combined were resulting in the number of rows being the product of the two pieces. Once split, there is also a where clause that can be applied to one of the pieces. The purpose of the method is to add every user that a document within a workspace is shared with to a "guest" group of the workspace itself. The design of "guest" groups is not ideal, but this diff leaves the design unchanged and is intended only to speed up operation. Made some small tweaks to the timing of a flakey test, and temporarily recreated the `samples` directory removed in a previous diff (this is currently breaking tests badly on a fresh worker without a `samples` directory lying around) Test Plan: added test; existing tests pass Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D2844 |
||
---|---|---|
.. | ||
DocApiForwarder.ts | ||
DocWorkerMap.ts | ||
HomeDBManager.ts | ||
Housekeeper.ts | ||
Permissions.ts | ||
scrubUserFromOrg.ts | ||
TypeORMPatches.ts | ||
Usage.ts | ||
values.ts |