So fileexists-no-change happens when your uploading a new version of a file, MediaWiki calculates the sha1 sum, and notices that the img_sha1 field in the db for the current version of the file is the same as what was just calculated for the new file. Which probably (although not necessarily now that sha1 is broken) means the file you're uploading is the same as the one already there.
backend-fail-alreadyexists basically means that MediaWiki was about to write a file somewhere, but there already was a file at that place, and the overwrite/overwriteSame flags were not set, so there should not have already been a file in that place (The file already there, may or may not be the same as the new file). Normally I would assume that something more frontend-y would give an error before this error would be encountered. Perhaps it might be encountered during a race condition. This is mostly speculation as I'm not super familiar with the FileBackend code. -- bawolff On Sat, Nov 16, 2019 at 6:51 AM Chen Xinyan <cxueso...@outlook.com> wrote: > Hi there, > > Hope I've found the correct list for asking this question. > > I was setting up a CI test case for my MediaWiki Client Library to run a > bot that will upload a file to https://en.wikipedia.beta.wmflabs.org in > chunked stash mode. For most of the time, when I perform the final upload > with filekey parameter, I will receive a fileexists-no-change error from > the MW API server. This is expected, as there is already a same file with > the same title on the site. However, today I received > backend-fail-alreadyexists. The error message looks like > > backend-fail-alreadyexists: The file > "mwstore://local-swift-eqiad/local-public/archive/9/95/20191116051316!Test_image.jpg" > already exists. > > Does this error usually occurs when user tries to upload the same file? > What's the difference between fileexists-no-change and > backend-fail-alreadyexists? > > Thanks, > Xinyan > > _______________________________________________ > Wikitech-l mailing list > Wikitechfirstname.lastname@example.org > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitechemail@example.com https://lists.wikimedia.org/mailman/listinfo/wikitech-l