Deprecate locking of dirty records
#25873

schuetzm wants to merge schuetzm:warn_about_dirty_lock into rails:master

We do not currently have an analysis of these two commits