Changeset 355
- Timestamp:
- 08/17/06 18:14:21 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/server-newrepl/lib/MogileFS/Worker/Monitor.pm
r353 r355 106 106 EOREQUEST 107 107 108 # TODO: hosts aren't writable. they're "available"109 108 # TODO: re-check the file was written as put. 110 109 # TODO: put something unique in the file 111 110 # TODO: guard against race-conditions with double-check on failure 112 111 112 # at this point we can reach the host 113 $self->broadcast_host_reachable($dev->{hostid}); 114 113 115 # now, depending on what happens 114 116 my $resp = $ua->request($req); 115 117 if ($resp->is_success) { 116 $self->broadcast_host_reachable($dev->{hostid});117 118 $self->broadcast_device_writeable($dev->{devid}); 118 119 error("dev$dev->{devid}: used = $used, total = $total, writeable = 1") … … 120 121 } else { 121 122 # merely readable 122 $self->broadcast_host_reachable($dev->{hostid});123 123 $self->broadcast_device_readable($dev->{devid}); 124 124 error("dev$dev->{devid}: used = $used, total = $total, writeable = 0") branches/server-newrepl/lib/MogileFS/Worker/Replicate.pm
r353 r355 17 17 # actually be tried again and require some sort of manual intervention. 18 18 use constant ENDOFTIME => 2147483647; 19 20 sub end_of_time { ENDOFTIME; } 19 21 20 22 sub new { … … 48 50 my $self = shift; 49 51 52 my $run_count = 0; 50 53 every(2.0, sub { 51 54 $self->parent_ping; … … 54 57 # marking things as being available 55 58 unless ($self->monitor_has_run) { 56 error("waiting for monitor job to complete a cycle before beginning replication"); 59 # only warn on runs after the first. gives the monitor job some time to work 60 # before we throw a message. 61 if ($run_count++ > 0) { 62 error("waiting for monitor job to complete a cycle before beginning replication"); 63 } 57 64 return; 58 65 }
