uuid
uuid copied to clipboard
Change after_fork suggestion to before_fork
Changing it in the worker process won't have the desired effect since then all the workers all get the same incremented sequence number. before_fork
runs in the master process before the fork, so the new sequence number gets inherited in each worker.
Any comment on this? We've had a couple of UUID collisions out of 18 million rows, which I believe is caused by this bug since the duplicated UUIDs were generated at the same time.
Also, for Puma, before_fork
only runs once before any workers are forked, so that should use a on_worker_fork
block (confusingly) instead.