| zhuyifei1999 removed zhuyifei1999 as the assignee of this task. zhuyifei1999 added a comment. |
Wait no.. the MediaWiki code for this is hard to deal with:
- ApiMain::checkReadOnly calls both wfReadOnly and ApiMain::checkBotReadOnly
- wfReadOnly calls wfGetLB()->getReadOnlyReason()
- The message given by LoadBalancer::getReadOnlyReason is hardcoded English
- When it sees the wiki as read-only ApiBase::dieReadOnly is called, generating an api error with translatable apierror-readonly and the hardcoded The database has been automatically locked while the slave database servers catch up to the master as the readonlyreason
- Then ApiMain::checkBotReadOnly is called, and after some logic it generates an API error with translatable readonly_lag and another hardcoded English Waiting for $numLagged lagged database(s) as the readonlyreason
- wfReadOnly calls wfGetLB()->getReadOnlyReason()
So two API errors seem to be generated, and both seem to lack some unique identifier.
TASK DETAIL
EMAIL PREFERENCES
To: zhuyifei1999
Cc: Mpaa, zhuyifei1999, Aklapper, pywikibot-bugs-list, Framawiki, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
Cc: Mpaa, zhuyifei1999, Aklapper, pywikibot-bugs-list, Framawiki, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
