Consistency · Fill in the blank

Making sure two people cannot register the same username at the same moment needs a blank operation, such as a unique constraint or a compare-and-set.

medium Databases

Answer

Making sure two people cannot register the same username at the same moment needs a linearizable operation, such as a unique constraint or a compare-and-set.

Also accepted: strongly consistent, consensus for linearizable.

Why

With eventual consistency, two replicas can each accept the name and only find the conflict later, when one user has to be told their account name changed.

Review this in your daily deck All cards in Consistency