Page MenuHomePhabricator

Make sure writes go to the right cluster
ClosedPublic

Authored by 20after4 on Mar 30 2017, 2:31 AM.
Tags
None
Referenced Files
F18869209: D17581.diff
Nov 4 2025, 10:26 AM
F18836756: D17581.diff
Oct 27 2025, 3:30 AM
F18830001: D17581.diff
Oct 25 2025, 3:07 AM
F18815196: D17581.id42294.diff
Oct 21 2025, 1:14 AM
F18807335: D17581.id.diff
Oct 19 2025, 12:44 AM
F18642183: D17581.diff
Sep 18 2025, 10:51 PM
F18591389: D17581.diff
Sep 12 2025, 9:05 AM
F18588231: D17581.id.diff
Sep 11 2025, 11:38 PM
Subscribers

Details

Summary

Two little issues

  1. there was an extra call to getHostForWrite,
  2. The engine instance was shared between multiple service definitions so it

was overwriting the list of writable hosts from one service with hosts from another.

Test Plan

tested in wikimedia production with multiple services defined like this:

language=json
 [
        {
          "hosts": [
            {
              "host": "search.svc.codfw.wmnet",
              "protocol": "https",
              "roles": {
                "read": true,
                "write": true
              },
              "version": 5
            }
          ],
          "path": "/phabricator",
          "port": 9243,
          "type": "elasticsearch"
        },
        {
          "hosts": [
            {
              "host": "search.svc.eqiad.wmnet",
              "protocol": "https",
              "roles": {
                "read": true,
                "write": true
              },
              "version": 5
            }
          ],
          "path": "/phabricator",
          "port": 9243,
          "type": "elasticsearch"
        }
      ]

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable