Need feedback on docs' improvement regarding OptimisticLocking vs. ActiveStorage race condition

Some time ago I discovered an edge case where having OptimisticLocking might lead to race conditions when embedding objects in has_rich_text field.

The problem is fully described here: Models with optimistic locking and has_rich_text are susseptible to race condition when ActiveStorage::Blob is attached and analyzed in a background job · Issue #55764 · rails/rails · GitHub

And I’m currently not sure if a framework-level solution is possible, so I proposed an addition to the docs:

But I have trouble getting the attention of someone with decision-making powers. (I tried on Discord, on the #contributions channel, to no avail).

I’d appreciate your thoughts on the issue, PR and who would be the best to ping regarding this.

1 Like