From be4065c55f355d757761e207833f8f765f99f8e7 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 12 Apr 2017 16:17:00 -0700 Subject: [PATCH] Add comments to ApiBase::isWriteMode() Change-Id: I3581f5e3055c425367d265a5c57831bb34dd5a2f --- includes/api/ApiBase.php | 7 +++++++ 1 file changed, 7 insertions(+) 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() { -- 2.20.1