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)
Sat, Feb 22, 2:40 AM
Unknown Object (File)
Fri, Feb 21, 3:16 PM
Unknown Object (File)
Sun, Feb 9, 4:50 AM
Unknown Object (File)
Sat, Feb 8, 11:36 AM
Unknown Object (File)
Sat, Feb 8, 9:51 AM
Unknown Object (File)
Jan 30 2025, 5:13 PM
Unknown Object (File)
Jan 30 2025, 3:15 AM
Unknown Object (File)
Jan 28 2025, 6:37 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