From: Aaron Schulz Date: Wed, 12 Apr 2017 23:17:00 +0000 (-0700) Subject: Add comments to ApiBase::isWriteMode() X-Git-Tag: 1.31.0-rc.0~3519^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=be4065c55f355d757761e207833f8f765f99f8e7;p=lhc%2Fweb%2Fwiklou.git Add comments to ApiBase::isWriteMode() Change-Id: I3581f5e3055c425367d265a5c57831bb34dd5a2f --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index b698ceffbc..37750c82e8 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -385,6 +385,13 @@ abstract class ApiBase extends ContextSource { /** * Indicates whether this module requires write mode + * + * This should return true for modules that may require synchronous database writes. + * Modules that do not need such writes should also not rely on master database access, + * since only read queries are needed and each master DB is a single point of failure. + * Additionally, requests that only need replica DBs can be efficiently routed to any + * datacenter via the Promise-Non-Write-API-Action header. + * * @return bool */ public function isWriteMode() {