Changeset 1142

Show
Ignore:
Timestamp:
02/04/08 11:56:01 (10 months ago)
Author:
hachi
Message:

r1317@miyako: hachi | 2008-02-04 03:49:58 -0800
MultipleHosts replication policy:


If we're already replicated to enough devices to satisfy the minimum device count but not enough to satisfy the minimum host count, we should return a temporary failure (retry later) instead of returning more desperate devices without ideal devices. This prevents files from replicating to every available device when there aren't enough hosts to write to.


Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/server/lib/MogileFS/ReplicationPolicy/MultipleHosts.pm

    r1141 r1142  
    9090    my @ideal = grep { ! $skip_host{$_->hostid} } @all_dests; 
    9191    my @desp  = grep {   $skip_host{$_->hostid} } @all_dests; 
     92 
     93    return TEMP_NO_ANSWER if $already_on >= $min && @ideal == 0; 
     94 
    9295    return MogileFS::ReplicationRequest->new( 
    9396                                             ideal => \@ideal,