jargon

Comparison

Out-of-order responsevsRace condition

Out-of-order response

you typed fast and the results for an earlier query arrived last and overwrote the right ones.

Two in-flight requests resolving in a different order from the one they were sent in, so the stale response is applied second. It shows up in any search-as-you-type field and any tab switcher, and it is invisible on a fast connection. The fixes are cancelling the previous request, or tagging each response and discarding any that is not the newest.

Full entry →

Race condition

the bug only shows up under load, never in tests, and the outcome depends on which of two threads got there first.

A defect where the result depends on the unpredictable relative timing of concurrent operations. The signature is irreproducibility: it happens once every ten thousand requests and never in a debugger. Most are read-modify-write sequences that need to be atomic and are not.

Full entry →

Related comparisons