Why this matters
Prevents hung resources and surfaces backpressure quickly.
Set sensible timeouts for queries/transactions and avoid excessively long timeouts that mask problems.
Prevents hung resources and surfaces backpressure quickly.
Side-by-side examples engineers can pattern-match during review.
stmt.setQueryTimeout(0); // infinitestmt.setQueryTimeout(30); // secondsno timeout setsetQueryTimeout(30)From the same buckets as this rule.
Review SQL/database migrations for operations that can lock large tables or cause downtime. Examples: creating indexes without CONCURRENTLY (Postgres), ALTER COLUMN TYPE on big tables, adding NOT NULL without backfill, long-running updates without batching. Require an online migration strategy (CONCURRENTLY, backfill in batches, dual-write/expand-contract) and a rollback plan.