Home GnuPG

Make sure writes go to the right cluster
cb1d90465447Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Make sure writes go to the right cluster

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"
        }
      ]

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D17581

Details

Provenance
Mukunda Modell <mmodell@wikimedia.org>Authored on Mar 30 2017, 8:08 PM
20after4 <autocommitter@example.com>Committed on Mar 30 2017, 8:08 PM
Parents
rPHAB67a1c4047647: Set content-type to application/json
Branches
Unknown
Tags
Unknown

Event Timeline

20after4 <autocommitter@example.com> committed rPHABcb1d90465447: Make sure writes go to the right cluster (authored by Mukunda Modell <mmodell@wikimedia.org>).Mar 30 2017, 8:08 PM