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)
Fri, Mar 22, 8:27 AM
Unknown Object (File)
Wed, Mar 20, 8:08 AM
Unknown Object (File)
Feb 21 2024, 8:42 PM
Unknown Object (File)
Feb 11 2024, 8:38 PM
Unknown Object (File)
Feb 4 2024, 7:49 AM
Unknown Object (File)
Jan 26 2024, 3:38 AM
Unknown Object (File)
Jan 22 2024, 9:33 AM
Unknown Object (File)
Jan 6 2024, 3:05 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