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
Unknown Object (File)
Tue, Dec 3, 12:47 PM
Unknown Object (File)
Sat, Nov 30, 7:53 AM
Unknown Object (File)
Tue, Nov 26, 2:58 PM
Unknown Object (File)
Mon, Nov 25, 6:39 AM
Unknown Object (File)
Thu, Nov 21, 8:37 AM
Unknown Object (File)
Sun, Nov 17, 7:20 AM
Unknown Object (File)
Fri, Nov 8, 11:32 AM
Unknown Object (File)
Nov 5 2024, 11:46 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