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
F21183806: D17581.id42302.diff
Sat, Jul 4, 1:04 PM
F21183803: D17581.id42302.diff
Sat, Jul 4, 1:04 PM
Unknown Object (File)
Mon, Jun 29, 10:57 PM
Unknown Object (File)
Fri, Jun 12, 1:37 PM
Unknown Object (File)
Jun 2 2026, 1:58 AM
Unknown Object (File)
Apr 11 2026, 5:03 PM
Unknown Object (File)
Apr 3 2026, 1:17 PM
Unknown Object (File)
Apr 3 2026, 7:48 AM
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