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
F15586109: D17581.id42294.diff
Thu, May 8, 12:48 PM
F15537747: D17581.id42294.diff
Thu, Apr 24, 3:31 PM
F15535223: D17581.diff
Thu, Apr 24, 4:05 AM
F15523304: D17581.id42294.diff
Mon, Apr 21, 12:31 AM
F15517089: D17581.id.diff
Fri, Apr 18, 11:57 PM
F15513480: D17581.id42294.diff
Thu, Apr 17, 7:16 PM
F15512418: D17581.diff
Thu, Apr 17, 10:36 AM
F15490693: D17581.id.diff
Fri, Apr 11, 7:47 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