Thanks for clearing things up.
Two people could have revision [zero] open for an hour of editing, and
coincidentally save at the same time.
This does not seem right. Let me propose a new sequence to challenge this.
- 20130910230505: Editor 1 saves rev_id=0 - 20130910230510: Editor 2 opens edit pane (conflict_time:20130910230505) - 20130910230512: Editor 3 opens edit page (conflict_time:20130910230505) - 20130911010101: Editor 2 saves the page (last_edit_time:20130910230505 == conflict_time:20130910230505) - last_edit_time = 20130911010101 - 20130911010101.5: Editor 3 saves the page (last_edit_time:20130911010101 != conflict_time:20130910230505) - Edit conflict is reported & no revision is saved.
-Aaron
On Wed, Nov 13, 2013 at 12:17 PM, Adam Wight awight@wikimedia.org wrote:
[manual reply-to-list]
*Aaron Halfaker* ahalfaker at wikimedia.org <analytics%40lists.wikimedia.org?Subject=Re%3A%20%5BAnalytics%5D%20Broken%20edit%20conflict%20detection&In-Reply-To=%3CCAKP%3D3Wx-sQurfXVc0FrgK8ODGisukH6hp-NrU3AdFNqvpJKh5Q%40mail.gmail.com%3E> *Mon Nov 11 15:28:31 UTC 2013*
Hey Adam,
I'd like to make sure I understand correctly. I propose the following three edit sequence.
- {rev_id: 1, rev_timestamp: "20130911010101", parent_id: null}
- {rev_id: 2, rev_timestamp: "20130911010101", parent_id: 1}
- {rev_id: 3, rev_timestamp: "20130911011200", parent_id: *???*}
Revisions #1 and #2 were saved in the same second (apparently #2 came after by a small fraction of a second). However, before #2 was saved, the edit pane was opened for creating revision #3. After 11 minutes, the third revisions is saved. Now my question is. What will its parent id be set to?
Thanks, -Aaron
Aaron, the parent id will be sequential, the issue here is actually a failure to identify the correct parent revision. So, to embellish on your scenario, a wikipedian opens an EditPage for revision 1, and meanwhile, another editor edits and saves to create revision 2.
Now, when the first editor saves their changes to content 1, the oldid detection fails to flag a conflict with revision 2. Changes in content 2 are discarded. However, rev3->parent_id will be "2". Everything will look normal and healthy, but it will look like the author of rev3 has reverted all changes in rev 2.
Lemme also note that the edits do not have to be instantaneous or even <1sec, they just have to be stored at the same timestamp. This would be more clear if we weren't talking about rev 1... Two people could have revision [zero] open for an hour of editing, and coincidentally save at the same time.
-Adam
On Sat, Nov 9, 2013 at 2:13 PM, Adam Wight awight@wikimedia.org wrote:
People doing revert analysis and stuff might be interested in this: https://bugzilla.wikimedia.org/show_bug.cgi?id=56849
It turns out, for some time we have been failing to detect edit conflicts if the two page saves occur within one second of each other. The second save will silently overwrite the previous edit, because it derives from an earlier parent... but the parent_id recorded in the revision table will incorrectly point to the conflicting edit. So the edit will look like a reversion plus some editing.
G'luck! -Adam
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics