Changeset 1173

Show
Ignore:
Timestamp:
04/09/08 20:53:28 (8 months ago)
Author:
hachi
Message:

Add global hook for taking care of the ordering of devices at get_paths time.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/server/lib/MogileFS/Worker/Query.pm

    r1172 r1173  
    882882    my @devices = map { $dmap->{$_} } @fid_devids; 
    883883 
    884     my @sorted_devs = sort_devs_by_utilization(@devices); 
     884    my @sorted_devs; 
     885    unless (MogileFS::run_global_hook('cmd_get_paths_order_devices', \@devices, \@sorted_devs)) { 
     886        @sorted_devs = sort_devs_by_utilization(@devices); 
     887    } 
    885888 
    886889    # keep one partially-bogus path around just in case we have nothing else to send.