From 78d6bcba6655baced16da4daed62155a2001bea2 Mon Sep 17 00:00:00 2001 From: arbulu89 Date: Tue, 9 Jul 2024 17:05:01 +0200 Subject: [PATCH] Add some comments to the code --- lib/trento/discovery/policies/cluster_policy.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/trento/discovery/policies/cluster_policy.ex b/lib/trento/discovery/policies/cluster_policy.ex index d21edb4c22..08f90e42e3 100644 --- a/lib/trento/discovery/policies/cluster_policy.ex +++ b/lib/trento/discovery/policies/cluster_policy.ex @@ -300,6 +300,10 @@ defmodule Trento.Discovery.Policies.ClusterPolicy do end) end + # parse_nodes_actual_roles parses each node roles depending on the cluster and architecture type + # 1st param is the roles array, 2nd param is the cluster type and the 3rd the hana architecture + # In classic scale out, the roles string has 6 values: 4:P:master1:master:worker:master + # In scale out and angi architecture, the roles have only 4 values: "master1:master:worker:master" defp parse_nodes_actual_roles( [_, _, _, nameserver_actual_role, _, indexserver_actual_role], ClusterType.hana_scale_up(),