All challenges
Multiple ChoiceBeginner 45s

Snowflake ID clock rollback

A Snowflake ID generator experiences a backwards clock jump. What is the safest behavior?
Options
  1. 1Continue generating IDs with the smaller timestamp, relying on the machine ID for uniqueness
  2. 2Randomize the machine ID on every clock regression so IDs stay unique despite going backwards
  3. 3Switch to UUIDv4 so IDs need no coordination, accepting the loss of time ordering
  4. 4Reject/wait until the clock catches up past the last issued timestamp to avoid duplicate IDs

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle