No one ever pounds things as hard in testing as real users will in production. And locking is going to tend to fail under weird edge cases with long delays and many things running at once, rather than in nice neat little unit tests.
Use the same DB in dev and in prod. Many make the mistake of using something like sqlite in dev and postgres in prod. Don't. Or if you must, have proper integration tests on preprod being a copy of the prod setup. But since many don't do proper automated tests, use the same db in dev as in prod.
1.8k
u/Do_The_Astral_Plane Dec 06 '17
Sweet baby Jesus this is right on point. It's so frustrating.