Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

issue-1423: cluster-osc-slaves API may not return all required slaves #1428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kamil-holubicki
Copy link

#1423

The new algorithm implemented:

Stage 1: 1st tier servers.

Get up to two 1st tier servers from each DC in the following order:

Most busiest IMs
Most lagging leaf nodes
Examples:
If there are N > 1 IMs in the DC, we will use the 2 busiest ones
(having the highest number of replicas)
If there is only 1 IM in the DC, but there are some leaf nodes,
we will use IM + most lagging leaf node
If there are no IMs in the DC, but there are leaf nodes, we will use
up to two most lagging leaf nodes
So this stage will collect at most 2 servers per DC

Stage 2: 2nd tier servers

Examine all collected 1st tier servers (from Stage 1),
and if they are IMs, get at most two busiest replicas for each server
(2nd tier servers).

So this stage will collect at most 2 replicas per IM.
If we collected 2 IMs per DC in Stage 1, here we will get 4 servers
per DC.

Stage 3: 3rd tier servers

Get 2 busiest 3rd tier replicas per DC.
If replicas are leaves we get the replica with a larger lag.

So this stage will collect at most 2 servers per DC

Added new tests 'get-heuristic-lag-multi-dc' and
'which-cluster-ocs-replicas'

openark#1423

The new algorithm implemented:

Stage 1: 1st tier servers.

Get up to two 1st tier servers from each DC in the following order:

Most busiest IMs
Most lagging leaf nodes
Examples:
If there are N > 1 IMs in the DC, we will use the 2 busiest ones
(having the highest number of replicas)
If there is only 1 IM in the DC, but there are some leaf nodes,
we will use IM + most lagging leaf node
If there are no IMs in the DC, but there are leaf nodes, we will use
up to two most lagging leaf nodes
So this stage will collect at most 2 servers per DC

Stage 2: 2nd tier servers

Examine all collected 1st tier servers (from Stage 1),
and if they are IMs, get at most two busiest replicas for each server
(2nd tier servers).

So this stage will collect at most 2 replicas per IM.
If we collected 2 IMs per DC in Stage 1, here we will get 4 servers
per DC.

Stage 3: 3rd tier servers

Get 2 busiest 3rd tier replicas per DC.
If replicas are leaves we get the replica with a larger lag.

So this stage will collect at most 2 servers per DC

Added new tests 'get-heuristic-lag-multi-dc' and
'which-cluster-ocs-replicas'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant