-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Problem stems from the fact that "guaranteed that subsequent calls to this BIF returns continuously increasing values"; see also https://github.com/erlang/otp/blob/master/erts/emulator/beam/erl_time_sup.c#L849
Hence
- "Sequence counter" id field will never go higher than 1000, wasting precious 6 bits.
- Generating more than 10e6 ids per second in one erlang wm will cause skewness of "time" id field, possibly resulting in incorrect ordering of ids from different machines; incomparability margin of these ids could grow uncontrollably.
Solution
Simply replacing erlang:now with os:timestamp seems to be enough.
Metadata
Metadata
Assignees
Labels
No labels