You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
two or more will generate the requisite 42P01/42703 error, and both will attempt to install the schema, and only one can succeed. The other will throw an error and exit.
There's two bugs here:
the installSchema should be wrapped with try/catch so that errors thrown there will trigger a retry of the whole loop
there's no sleep(), so it'll instantly retry which can be painful - we should use randomized back-off
The text was updated successfully, but these errors were encountered:
Only affects first run of worker against your DB, so if you already have worker running you're fine.
If you run 10
graphile-worker
instances against a clean database all at the same time there's a good chance that in this code:worker/src/migrate.ts
Lines 117 to 137 in 436e299
two or more will generate the requisite
42P01
/42703
error, and both will attempt to install the schema, and only one can succeed. The other will throw an error and exit.There's two bugs here:
installSchema
should be wrapped withtry/catch
so that errors thrown there will trigger a retry of the whole loopsleep()
, so it'll instantly retry which can be painful - we should use randomized back-offThe text was updated successfully, but these errors were encountered: