mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
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:
parent
b19104ed04
commit
6bd5142f2a
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue