[openstreetmap/openstreetmap-website] Lock changesets during a diff upload (PR #6379)
Tom Hughes
notifications at github.com
Wed Oct 8 17:27:42 UTC 2025
tomhughes left a comment (openstreetmap/openstreetmap-website#6379)
Putting `lock` before `find` avoids doing two reads because `find` realises the query and returns a changeset so calling `lock!` then has to do a new select to acquire the lock. Putting `lock` before the `find` just adds it as a modifier on the AREL object that is then executed by `find`.
I think the point of the safe navigation operator in the other cases is to avoid raising an exception if there was a bogus changeset ID in the XML that doesn't exist - that will then get properly detected when creating/updating the object by the consistency checks.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6379#issuecomment-3382546144
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6379/c3382546144 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251008/fa10e7e7/attachment.htm>
More information about the rails-dev
mailing list