An operation is processed idempotently if doing it twice has the same effect as doing it once. For orders, it means that every order carries an identifier fixed when it is created, so that the venue, or the firm’s own gateway, recognises a second copy and discards it.
| procedure | duplicates, by stage of the order at the failure | largest position | |||
| journaled | in flight | at the venue | reported | ||
| fresh identifiers | 0 | 27 | 27 | 0 | 1 100 |
| fresh identifiers, reconciled first | 0 | 0 | 0 | 0 | 1 000 |
| idempotency keys | 0 | 0 | 0 | 0 | 1 000 |
fig_failover.py (deterministic).