Page MenuHomePhabricator

"backend-fail-notsame" exception when trying to restore file via API on beta commons
Open, Needs TriagePublic2 Estimated Story PointsBUG REPORT

Description

What is the problem?

When trying to restore https://commons.wikimedia.beta.wmflabs.org/wiki/File:Enwiki_with_login.png via the API, it returns the exception:

{
    "error": {
        "code": "backend-fail-notsame",
        "info": "A non-identical file already exists at \"mwstore://local-swift-eqiad/local-public/archive/2/26/20220401081412!Enwiki_with_login.png\".",
        "*": "See https://commons.wikimedia.beta.wmflabs.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
    },
    "servedby": "deployment-mediawiki11"
}

Note that https://upload.wikimedia.beta.wmflabs.org/wikipedia/commons/archive/2/26/20220401081412!Enwiki_with_login.png is still accessible. This suggests that the file was not deleted successfully (which I did via the API last Friday, passing the new deletetalk parameter).

There was also an EventBus in the logs at about the same time I was deleting the file: https://beta-logs.wmcloud.org/app/dashboards#/view/default?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2022-04-01T07:50:00.000Z',to:'2022-04-01T07:55:00.000Z'))&_a=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'5f0c9be0-0b6f-11ec-9cde-3f4490e09a26',key:level,negate:!f,params:(query:ERROR),type:phrase),query:(match_phrase:(level:ERROR))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'5f0c9be0-0b6f-11ec-9cde-3f4490e09a26',key:'@timestamp',negate:!f,params:(query:'2022-04-01T07:51:55.300Z'),type:phrase),query:(match_phrase:('@timestamp':'2022-04-01T07:51:55.300Z')))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:Default,viewMode:view)

I have not been able to reproduce this again on beta or on testwiki (with https://test.wikipedia.org/wiki/File:Test_file_for_T290210.png).

Steps to reproduce problem

https://commons.wikimedia.beta.wmflabs.org/wiki/Special:ApiSandbox#action=undelete&format=json&title=File%3AEnwiki_with_login.png

Environment

Wiki(s): https://commons.wikimedia.beta.wmflabs.org MediaWiki 1.39.0-alpha (ae2c530) 12:18, 4 April 2022.

Event Timeline

I'm not sure how to proceed here if we can't reproduce it. I think it might have been a symptom of some other bug that has since been fixed? I agree it sounds like the file wasn't deleted properly.

Should we remove this from the sprint? If no one is able to repro we can't do much.