gristlabs_grist-core/test/nbrowser
Paul Fitzpatrick c4d3d7d3bb (core) be careful when reassigning a doc to a worker it was on before
Summary:
Importing a .grist document is implemented in a somewhat clunky way, in a multi-worker setup.

 * First a random worker receives the upload, and updates Grist's various stores appropriately (database, redis, s3).
 * Then a random worker is assigned to serve the document.

If the worker serving the document fails, there is a chance the it will end up assigned to the worker that handled its upload. Currently the worker will misbehave in this case. This diff:

 * Ports a multi-worker test from test/home to run in test/s3, and adds a test simulating a bad scenario seen in the wild.
 * Fixes persistence of any existing document checksum in redis when a worker is assigned.
 * Adds a check when assigned a document to serve, and finding that document already cached locally. It isn't safe to rely only on the document checksum in redis, since that may have expired.
 * Explicitly claims the document on the uploading worker, so this situation becomes even less likely to arise.

Test Plan: added test

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3305
2022-03-08 17:20:01 -05:00
..
ActionLog.ts (core) move more tests to grist-core 2021-12-10 18:33:07 -05:00
DuplicateDocument.ts (core) move more tests to grist-core 2021-12-10 18:33:07 -05:00
Fork.ts (core) move more tests to grist-core 2021-12-10 18:33:07 -05:00
gristUtils.ts (core) be careful when reassigning a doc to a worker it was on before 2022-03-08 17:20:01 -05:00
HomeIntro.ts (core) Update HomeIntro.ts to check for either login page 2022-02-24 15:28:16 -08:00
homeUtil.ts (core) Add missing .isPresent() to isOnTestLoginPage 2022-03-02 10:10:26 -08:00
Smoke.ts (core) Remove code for unused welcome flows 2022-02-28 13:21:28 -08:00
testServer.ts (core) copy settings related to gvisor from staging to prod 2021-11-08 16:40:03 -05:00
testUtils.ts (core) Fix some bugs with ChoiceList in summary tables, and evaluation of lookups. 2021-12-15 09:51:18 -05:00