-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Was wondering if it would be possible have safe saves be the default for a collection/model.
We have .create! or .save! in various places around the code for this model. We try to remain vigilant about setting them to safe, but with a large code base, they can sneak in.
The bug manifests itself when we create a new record of this model and then some other code needs to read it right after it's saved. It seems in production under load, once in a while the read will not find the newly saved record on the first read. We have consistency: :strong set, but if I'm understanding correctly it's not guaranteed to be readable right away unless we use with(safe: true). Thanks!