tie breaker

A final unique field, usually the identifier, added to a sort order so items with equal values always come out in the same order.

In more detail

Without a tie breaker, items with equal keys can come out in an unpredictable order, which makes pagination and tests unstable. A unique value such as an ID or an insertion counter is the usual choice.

Example

Heap entries (priority, counter, task) use the counter to break ties so tasks are never compared.

Related terms

Taught in

References