[openstreetmap/openstreetmap-website] Lock changesets during a diff upload (PR #6379)

Tom Hughes notifications at github.com
Sat Sep 27 13:37:06 UTC 2025


tomhughes left a comment (openstreetmap/openstreetmap-website#6379)

Yes @mmd-osm says it doesn't really matter how many times the changeset is loaded at the ruby level - what matters is that we take a lock in the database before making any changes to it in the database.

Each object change will then read the changeset, update it and write it back, but as that's all inside the transaction each subsequent read will see the dirty data from previous writes inside the uncommitted transaction so as those events are sequential there is no risk there.

The lock will be released when the transaction is committed and any other diff upload (or single object change) that tries to run will have to wait for the lock to release before it can get it's own lock and start making changes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6379#issuecomment-3341718755
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6379/c3341718755 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250927/dadb3f5b/attachment.htm>


More information about the rails-dev mailing list