diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-10-12 10:43:28 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-10-12 10:57:57 +0100 |
| commit | 06bd29f2093cee6c1c0efd02e08c17088415e3ef (patch) | |
| tree | 9a4acd0c53c640557dac52dfaa847fe2b871c3e5 /packages/backend/src/server/api/EndpointsModule.ts | |
| parent | merge: New logo (!681) (diff) | |
| download | sharkey-06bd29f2093cee6c1c0efd02e08c17088415e3ef.tar.gz sharkey-06bd29f2093cee6c1c0efd02e08c17088415e3ef.tar.bz2 sharkey-06bd29f2093cee6c1c0efd02e08c17088415e3ef.zip | |
try to avoid `insert` races in `FederatedInstanceService`
Despite the cache, different processes can race to insert a row for
the same remote host.
This is particularly apparent in our unit tests, with
`test/unit/activitypub.ts` randomly failing.
This is a (somewhat clumsy) attempt at working around that race: trap
the "duplicate key value" error, and fetch the record.
Tests pass, with or without values in the cache.
Diffstat (limited to 'packages/backend/src/server/api/EndpointsModule.ts')
0 files changed, 0 insertions, 0 deletions