Skip to content

Commit

Permalink
fix priority/weight calculation for QD static sorting. refs yeti-swit…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-sinina committed Aug 29, 2022
1 parent be788a8 commit da79b2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions db/migrate/20220829195515_src_number_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,8 @@ def up
t_dp.locked as dp_locked,
t_dp.enabled as dp_enabled,
t_dp.force_hit_rate as dp_force_hit_rate,
rpsr.priority as rpsr_priority,
rpsr.weight as rpsr_weight
COALESCE(rpsr.priority, t_dp.priority) as rpsr_priority,
COALESCE(rpsr.weight, 100) as rpsr_weight
FROM class4.dialpeers t_dp
JOIN billing.accounts t_vendor_account ON t_dp.account_id=t_vendor_account.id
join public.contractors t_vendor on t_dp.vendor_id=t_vendor.id
Expand Down
12 changes: 6 additions & 6 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18868,8 +18868,8 @@ CREATE FUNCTION switch20.route(i_node_id integer, i_pop_id integer, i_protocol_i
t_dp.locked as dp_locked,
t_dp.enabled as dp_enabled,
t_dp.force_hit_rate as dp_force_hit_rate,
rpsr.priority as rpsr_priority,
rpsr.weight as rpsr_weight
COALESCE(rpsr.priority, t_dp.priority) as rpsr_priority,
COALESCE(rpsr.weight, 100) as rpsr_weight
FROM class4.dialpeers t_dp
JOIN billing.accounts t_vendor_account ON t_dp.account_id=t_vendor_account.id
join public.contractors t_vendor on t_dp.vendor_id=t_vendor.id
Expand Down Expand Up @@ -20126,8 +20126,8 @@ CREATE FUNCTION switch20.route_debug(i_node_id integer, i_pop_id integer, i_prot
t_dp.locked as dp_locked,
t_dp.enabled as dp_enabled,
t_dp.force_hit_rate as dp_force_hit_rate,
rpsr.priority as rpsr_priority,
rpsr.weight as rpsr_weight
COALESCE(rpsr.priority, t_dp.priority) as rpsr_priority,
COALESCE(rpsr.weight, 100) as rpsr_weight
FROM class4.dialpeers t_dp
JOIN billing.accounts t_vendor_account ON t_dp.account_id=t_vendor_account.id
join public.contractors t_vendor on t_dp.vendor_id=t_vendor.id
Expand Down Expand Up @@ -21257,8 +21257,8 @@ CREATE FUNCTION switch20.route_release(i_node_id integer, i_pop_id integer, i_pr
t_dp.locked as dp_locked,
t_dp.enabled as dp_enabled,
t_dp.force_hit_rate as dp_force_hit_rate,
rpsr.priority as rpsr_priority,
rpsr.weight as rpsr_weight
COALESCE(rpsr.priority, t_dp.priority) as rpsr_priority,
COALESCE(rpsr.weight, 100) as rpsr_weight
FROM class4.dialpeers t_dp
JOIN billing.accounts t_vendor_account ON t_dp.account_id=t_vendor_account.id
join public.contractors t_vendor on t_dp.vendor_id=t_vendor.id
Expand Down

0 comments on commit da79b2e

Please sign in to comment.