Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#428 LB breaks when calling load_balance() w differing resources

trunk
closed-fixed
modules (454)
5
2011-09-30
2011-09-28
Walter Doekes
No

Hi,

when calling load_balance() with "resource1" and sometimes with "resource1;resource2" the call_res static array in do_load_balance is resized, and call_res_no is updated to two.

When calling get_dst_load, call_res_no is passed, instead of rl->n, so get_dst_load is always performed on 2 resources, even when only one is passed.

This can result in get_dst_load returning 0 (either with a CRITICAL error) or in some cases simply the wrong load.

See the attached one-line fix.

Regards,
Walter Doekes
OSSO B.V.

(1.7 and earlier are also affected)

Discussion

    • assigned_to: nobody --> bogdan_iancu
     
    • status: open --> closed-fixed
     
  • Hi Walter,

    Thanks for the fix - good catch!

    Regards,
    Bogdan