Catrope has uploaded a new change for review.

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

Change subject: When content and metadata have different revids, explicitly 
retry the higher one
......................................................................

When content and metadata have different revids, explicitly retry the higher one

It's much less likely we'll get another conflict if we retry
with ?oldid=12345 than if we retry omitting the oldid again.

Change-Id: I10e40f714fd44d7f0ac16c9d0dc6239a95c0ec51
---
M modules/ve-mw/init/ve.init.mw.Target.js
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/64/200064/1

diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 99d2cc5..07a67e4 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -354,8 +354,13 @@
                                );
                        } else {
                                this.retriedRevIdConflict = true;
-                               // Have to retry both until we can access the 
document server directly...
+                               // TODO this retries both requests, in RESTbase 
mode we should only retry
+                               // the request that gave us the lower revid
                                this.loading = false;
+                               // HACK: Load with explicit revid to hopefully 
prevent this from happening again
+                               if ( !this.requestedRevId ) {
+                                       this.requestedRevId = Math.max( 
docRevId, this.revid );
+                               }
                                this.load();
                        }
                        return;

-- 
To view, visit https://gerrit.wikimedia.org/r/200064
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10e40f714fd44d7f0ac16c9d0dc6239a95c0ec51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to