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
This commit is contained in:
Roan Kattouw 2015-03-26 16:06:43 -07:00
parent b19104ed04
commit 6bd5142f2a

View file

@ -354,8 +354,13 @@ ve.init.mw.Target.onLoad = function ( response ) {
); );
} else { } else {
this.retriedRevIdConflict = true; 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; 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(); this.load();
} }
return; return;