MT#56123 swap nodeA<->nodeB ID modulus/offsets

when repl is stuck (for whatever reason), each rate-o-mat
instance basically should proceed processing it's local
CDRs.

we observed it stalls though in that case.

the reason is because currently nodeA rate-o-mat is doing
even cdr IDs and nodeB is doing odd cdr IDs.

it has to be vice versa for the current offset configuration
in my.cnf. we might want to read the offset configuration
directly from the .cnf in a next step.

Change-Id: I0d6bafbd33f0d3370393a8cf1a763a7963bc017f
(cherry picked from commit fe251704f7)
(cherry picked from commit 2b52d00132)
mr10.5.8
Rene Krenn 3 years ago
parent 354e29dbd4
commit a21c810f9a

@ -2055,18 +2055,18 @@ sub get_unrated_cdrs {
} elsif (substr($nodename,-1,1) eq '1' or substr($nodename,-1,1) eq 'a') {
push(@cdrs,$cdr) if (
(($cdr->{id} % 2) == 1
and ($cdr->{id} % 4) == 1)
and ($cdr->{id} % 4) == 3)
or
(($cdr->{id} % 2) == 0
and ($cdr->{id} % 4) == 0)
and ($cdr->{id} % 4) == 2)
);
} elsif (substr($nodename,-1,1) eq '2' or substr($nodename,-1,1) eq 'b') {
push(@cdrs,$cdr) if (
(($cdr->{id} % 2) == 1
and ($cdr->{id} % 4) == 3)
and ($cdr->{id} % 4) == 1)
or
(($cdr->{id} % 2) == 0
and ($cdr->{id} % 4) == 2)
and ($cdr->{id} % 4) == 0)
);
} else {
push(@cdrs,$cdr);
@ -2248,7 +2248,7 @@ sub update_cdr {
copy_cdr_col_data($acc_tag_col_model_key,$dup_tag_col_model_key,$cdr,$cdr->{id},$dup_cdr_id,
{ direction => 'destination', provider => 'customer', tag => 'header=Diversion' });
copy_cdr_col_data($acc_tag_col_model_key,$dup_tag_col_model_key,$cdr,$cdr->{id},$dup_cdr_id,
{ direction => 'destination', provider => 'customer', tag => 'hg_ext_response' });

Loading…
Cancel
Save