uuid icon indicating copy to clipboard operation
uuid copied to clipboard

Change after_fork suggestion to before_fork

Open aripollak opened this issue 9 years ago • 2 comments

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.

aripollak avatar May 11 '15 21:05 aripollak

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.

aripollak avatar Jul 07 '15 18:07 aripollak

Also, for Puma, before_fork only runs once before any workers are forked, so that should use a on_worker_fork block (confusingly) instead.

aripollak avatar Apr 05 '16 19:04 aripollak