Support #758

Updated UID generatione algorythm

Added by Madars over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:01/14/2022
Priority:Normal (Code 4)Due date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

Current Enduro/X uuid generator uses libuuid which currently uses /dev/urandom to produce the IDs. Thought this exposes system to theoretical ID

Enduro/X Unique ID generation algorithm (libexuuid) shall be replaced, with simple UID generator:

Something like:

<NODEID - 1 byte><PID 4 byte><Sequence counter 4 bytes><Unix UTC time stamp 5 - bytes><Random number - 2 bytes>: total 16 bytes.

This guarantees that within Enduro/X cluster:
- Transaction IDs, and Persistent Queue message IDs would be unique
- In case if time is moved backwards then timestamp (with random start number) & 2 random shall provide high probability that numbers does not collide with previously generated ones.

History

#1 Updated by Madars about 2 years ago

Release notes

Updated transaction-id and message-id generation algorithm, which guarantees 4 billion identifiers may be generated within second without any duplicates.
If clock adjustments are made or more than 4 billion ids are generated (which is highly unlike number of one process), then 6 byte randomness shall cope with the duplicates.

Available from Enduro/X release 7.5.38+, 8.0.1+.

#2 Updated by Madars about 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#3 Updated by Madars about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF