Skip to content
Snippets Groups Projects
Commit 06bd29f2 authored by dakkar's avatar dakkar
Browse files

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.
parent f3e6b43e
No related branches found
No related tags found
Loading
Pipeline #1470 passed with stage
in 8 minutes and 59 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment