Page MenuHomePhabricator

Improve error message for edit conflict in DiscussionTools
Closed, ResolvedPublic

Description

Occasionally, if two comments are posted on the same talk page using DiscussionTools at almost exactly the same time, one of the users will see an error message that just says "Edit conflict.".

It should be very rare, and difficult to avoid, so we probably shouldn't spend time on that. But we should improve the message to explain the problem and advise to retry.

@matmarex: Also, for sequence 6, I am noticing that, sometimes I am getting the error message "Edit Conflict" for the second user and sometimes, they just get posted one after the other just fine. Is there a specific criteria that will trigger this message?

This is expected – it just depends on the timing, and database load at the moment (that is, on whether your previous message is already present in replica databases or not).

We previously had some code to automatically retry in this case, although we removed it, because it's difficult to decide how many times and after what delay we should retry, and we have no way to actually force the replication to happen or guarantee that it did, so the error could still occur, just less often. I think this error will be very rarely seen by users in normal usage, only when two comments are posted at nearly exactly the same time, but we could probably add that back to make it even rarer.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

matmarex created this task.Sep 1 2020, 7:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 1 2020, 7:16 PM

Some related existing messages, for inspiration:

Your changes could not be saved because of an edit conflict. Would you like to resolve the conflict manually?

Unfortunately, someone else posted at the same time as you. Please review the comments on the next page. If needed, you can edit yours and change the final order.

Someone else has changed this page since you started editing it. The upper text area contains the page text as it currently exists. Your changes are shown in the lower text area. You will have to merge your changes into the existing text. Only the text in the upper text area will be saved when you press "$1".

Change 623652 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Improve error message for edit conflict

https://gerrit.wikimedia.org/r/623652

Change 623652 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Improve error message for edit conflict

https://gerrit.wikimedia.org/r/623652

ppelberg closed this task as Resolved.Sep 5 2020, 12:48 AM
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptSep 5 2020, 12:48 AM