Uncategorized

  • predict_linear for a disk, not a percentage

    Eighty percent on a disk growing a percent a quarter is not a problem, and eighty percent on one that gained fifteen points overnight is — a single…

  • pt-query-digest ranks by total time, not by slowest

    The slow log ranks by individual duration, so a query taking two seconds once appears above one taking forty milliseconds two hundred thousand times. Ranking by total time…

  • Asserting on the job dispatched, and on the job itself

    Testing that a controller queued something by starting a worker is slow and flaky; testing it by reading the queue table couples the test to the driver. Splitting…

  • SSH certificates expire on their own

    Managing authorized_keys across thirty servers means a configuration run to add a colleague and another to remove one, and the removal is the one that gets forgotten. Access…

  • A schema dump is a starting point, not a migration

    Squashing two hundred migrations into a schema dump takes forty seconds off every test run, and it introduces a second source of truth that has to be kept…

  • docker-compose config is the only reliable answer

    A compose file with variable substitution, an override and an anchor is not readable by inspection, and the gap between what you think it says and what it…

  • Custom casts, and the value object that fits the ORM

    An accessor and a mutator per value object, in every model that has one. 7.0 adds a castable class, and the pair can retire.

  • A read replica that was silently stale

    The replica was up, accepting connections and serving data from an hour ago. Seconds_Behind_Master reported zero, honestly, and was measuring the wrong thing.

  • EXPLAIN ANALYZE reports what happened, not what might

    EXPLAIN shows the plan and the optimiser’s estimates, and the estimates are frequently wrong — a query planned for 40 rows that reads 400,000 looks entirely healthy. The…

  • wp_get_environment_type, in core at last

    WordPress had no concept of an environment, so every site invented one — and the versions differed enough that a shared plugin could not rely on any of…