Commit graph

3 commits

Author SHA1 Message Date
Timo Tijhof
27aa07815c rdbms: Rename internal ServerInfoHolder to ServerInfo
Follows-up I177d57e2e34aea (3909c1440a).

Change-Id: Ic7332abc5512a74f62ff01e1bd9566047b81cb59
2023-03-07 23:36:39 +00:00
Amir Sarabadani
3909c1440a rdbms: Introduce ServerInfoHolder to limit access to servers in LB
For example, any part of LB can write and change number of servers.

Bug: T326274
Change-Id: I177d57e2e34aea176a53c4d96d58f428b9a16634
2023-02-20 18:58:15 +01:00
Tim Starling
bcfb90cdd7 objectcache: Simplify SqlBagOStuff class configuration
Substantive changes:

* Remove the parameters globalKeyLB and localKeyLB, not needed in
  production, probably not used anywhere.
* Add a "cluster" parameter, for production.
* Don't call markServerDown() in LoadBalancer mode.

Style changes:

* Document config parameters separately from constructor parameters, to
  clarify the role of the wiring normalisation.
* Inject a load balancer from ObjectCache to SqlBagOStuff, using a
  closure to defer construction.
* Clarify the split between LoadBalancer mode and server array mode by
  introducing a useLB property. Use it instead of special shard index
  values and array counts.
* multiPrimaryModeType wasn't needed anywhere and wasn't available in
  the constructor, so it just became a boolean multiPrimaryMode.
* Add a test covering most of the server array (!useLB) branches.

Bug: T212129
Change-Id: Ib097082efb40b514a29a42286dc362f2e3743ee4
2022-05-27 15:04:43 +00:00