Changeset 1202

Show
Ignore:
Timestamp:
08/10/08 06:16:24 (3 months ago)
Author:
dormando
Message:

oft-requested confusion-fixer. Allow users to not wait on replication.

The larger issue is we can't readily tell how many copies were requested unless we pull in MogileFS::Admin and load up the class. Which starts to sound like work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/utils/mogtool

    r1198 r1202  
    575575               'description=s' => \$opts{des}, 
    576576               'concurrent=i'  => \$opts{concurrent}, 
     577               'noreplwait'    => \$opts{noreplwait}, 
    577578 
    578579               # extract options 
     
    978979    # verify replication and chunks 
    979980    my %paths; # { chunknum => [ path, path, path ... ] } 
    980     my %still_need = ( %chunkinfo ); 
     981    my %still_need = $opts{noreplwait} ? () : ( %chunkinfo ); 
    981982    while (%still_need) { 
    982         print "Beginning replication wait: " . join(' ', sort { $a <=> $b } keys %still_need) . "\n"; 
     983        print "Replicating (disable with --noreplwait): " . join(' ', sort { $a <=> $b } keys %still_need) . "\n"; 
    983984        sleep 1; # give things time to replicate some 
    984985