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
F14699995: D17581.id42294.diff
Tue, Jan 14, 2:31 PM
Unknown Object (File)
Tue, Dec 31, 12:34 PM
Unknown Object (File)
Mon, Dec 30, 8:14 AM
Unknown Object (File)
Thu, Dec 26, 11:33 AM
Unknown Object (File)
Dec 8 2024, 5:37 AM
Unknown Object (File)
Dec 3 2024, 12:47 PM
Unknown Object (File)
Nov 30 2024, 7:53 AM
Unknown Object (File)
Nov 26 2024, 2:58 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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16220
Build 21541: Run Core Tests
Build 21540: arc lint + arc unit