FOMO Daily
Feed
Evil Martiansยท

Don't bet on SELECT's order: shuffle your rows and see what folds

DatabasesPostgreSQLSQLRailsChaos Engineering

TL;DR

Queries without ORDER BY can appear to return rows consistently, hiding assumptions that later cause flaky tests or production bugs. The authors deliberately shuffled unordered query results to expose those assumptions, finding issues in Rails, Django, and Gitea. They built the PostgreSQL extension pg_disorder for this testing approach, and Rails merged a similar option slated for version 8.2.

Read the original post Sign in to mark as read or skip