line |
true |
false |
branch |
37
|
0 |
0 |
unless @$queue_todo or @$queue_todo2 |
39
|
0 |
0 |
unless $self->validate_dbh |
81
|
0 |
0 |
if $$todo{'fromdevid'} |
85
|
0 |
0 |
if ($status) |
95
|
0 |
0 |
if $unlock |
99
|
0 |
0 |
if $Mgd::DEBUG >= 2 |
124
|
0 |
0 |
if ($errcode eq 'failed_getting_lock') |
125
|
0 |
0 |
if $unlock |
133
|
0 |
0 |
if ($type eq 'end_of_time') { } |
|
0 |
0 |
elsif ($type eq 'offset') { } |
148
|
0 |
0 |
if ($errcode eq 'no_source') |
150
|
0 |
0 |
if $unlock |
158
|
0 |
0 |
if ($errcode eq 'too_happy') |
159
|
0 |
0 |
if $unlock |
170
|
0 |
0 |
if ($dev->can_delete_from and $dev->should_read_from) |
175
|
0 |
0 |
if $devfid |
183
|
0 |
0 |
if $unlock |
201
|
0 |
0 |
unless $fid->exists |
218
|
0 |
0 |
unless ($ret or $errcode eq 'too_happy') |
225
|
0 |
0 |
if ($errcode eq 'too_happy' or $ret eq 'lost_race') { } |
|
0 |
0 |
elsif ($ret eq 'would_worsen') { } |
234
|
0 |
0 |
if ($devfid->exists) { } |
241
|
0 |
0 |
if $test_df->devid == $devfid->devid |
242
|
0 |
0 |
if ($test_df->size_matches) |
265
|
0 |
0 |
if 'MogileFS::Config'->config('rebalance_ignore_missing') |
268
|
0 |
0 |
if ($should_delete) |
270
|
0 |
0 |
if ($@) |
294
|
0 |
0 |
unless ref $fid |
297
|
0 |
0 |
if $Mgd::DEBUG >= 2 |
305
|
0 |
0 |
if %opts |
306
|
0 |
0 |
unless ref $mask_devids eq 'HASH' |
318
|
0 |
0 |
if (@_ == 2) { } |
324
|
0 |
0 |
if $errref |
327
|
0 |
0 |
if ($errcode and $errcode eq 'failed_getting_lock') { } |
332
|
0 |
0 |
$rv ? : |
334
|
0 |
0 |
if ($no_unlock) { } |
335
|
0 |
0 |
unless wantarray |
338
|
0 |
0 |
if wantarray |
345
|
0 |
0 |
unless my $devs = Mgd::device_factory()->map_by_id |
348
|
0 |
0 |
unless $sto->should_begin_replicating_fidid($fidid) |
353
|
0 |
0 |
unless $fid->exists |
364
|
0 |
0 |
unless my $d = Mgd::device_factory()->get_by_id($devid) |
367
|
0 |
0 |
if ($d->dstate->should_have_files and not $$mask_devids{$devid}) |
370
|
0 |
0 |
if ($d->should_read_from) |
375
|
0 |
0 |
if @on_devs == 0 |
376
|
0 |
0 |
if @on_up_devid == 0 |
378
|
0 |
0 |
if ($fixed_source and not grep({$_ == $fixed_source;} @on_up_devid)) |
388
|
0 |
0 |
if (@$target_devids) |
402
|
0 |
0 |
if $rr->is_happy |
406
|
0 |
0 |
if (@ddevs = $rr->copy_to_one_of_ideally) { } |
|
0 |
0 |
elsif (@ddevs = $rr->copy_to_one_of_desperate) { } |
407
|
0 |
0 |
if (my(@not_masked_ids) = grep({not $$mask_devids{$_} || $$avoid_devids{$_};} map({$_->id;} @ddevs))) { } |
445
|
0 |
0 |
if ($dest_failed{$ddevid}) |
452
|
0 |
0 |
if (grep {$_->id == $ddevid;} @on_devs) |
461
|
0 |
0 |
unless @choices |
462
|
0 |
0 |
if ($fixed_source and grep {$_ == $fixed_source;} @choices) { } |
471
|
0 |
0 |
unless my $worker = 'MogileFS::ProcManager'->is_child |
474
|
0 |
0 |
if $fid_checksum |
475
|
0 |
0 |
if $cls->hashtype |
485
|
0 |
0 |
unless $rv or $copy_err =~ /^(?:src|dest)_error$/ |
487
|
0 |
0 |
unless ($rv) |
489
|
0 |
0 |
if ($copy_err eq 'src_error') { } |
492
|
0 |
0 |
if ($fixed_source and $fixed_source == $sdevid) |
504
|
0 |
0 |
if ($digest and not $fid->checksum) |
514
|
0 |
0 |
if ($rr->too_happy) |
518
|
0 |
0 |
if ($rr->is_happy) |
519
|
0 |
0 |
if $got_copy_request |
538
|
0 |
0 |
unless defined $line |
539
|
0 |
0 |
unless $line =~ m[\AHTTP/(\d+\.\d+)\s+(\d+)] |
545
|
0 |
0 |
unless defined $line |
546
|
0 |
0 |
if $line =~ /\A\r?\n\z/ |
547
|
0 |
0 |
if ($line =~ /\AConnection:\s*keep-alive\s*\z/is) { } |
|
0 |
0 |
elsif ($line =~ /\AConnection:\s*close\s*\z/is) { } |
|
0 |
0 |
elsif ($line =~ /\AContent-Length:\s*(\d+)\s*\z/is) { } |
569
|
0 |
0 |
if %opts |
571
|
0 |
0 |
unless ref $fid |
578
|
0 |
0 |
if ($fid_checksum and $fid_checksum->hashname eq 'MD5') |
590
|
0 |
0 |
if $errref |
591
|
0 |
0 |
if $sconn |
592
|
0 |
0 |
if $dconn |
613
|
0 |
0 |
unless $sdev and $ddev |
623
|
0 |
0 |
if ('MogileFS::Config'->config('repl_use_get_port')) |
627
|
0 |
0 |
unless (defined $spath and defined $dpath and defined $shostip and defined $dhostip and $sport and $dport) |
653
|
0 |
0 |
if $shttphost |
660
|
0 |
0 |
if $sconn |
662
|
0 |
0 |
if $dconn |
665
|
0 |
0 |
unless $sconn = $shost->http_conn_get(\%sopts) |
668
|
0 |
0 |
unless ($sock->write("$get\r\n")) |
669
|
0 |
0 |
if $sconn->retryable and $stries == 1 |
675
|
0 |
0 |
unless ($sres) |
676
|
0 |
0 |
if $sconn->retryable and $stries == 1 |
679
|
0 |
0 |
unless ($$sres{'code'} >= 200 and $$sres{'code'} <= 299) |
684
|
0 |
0 |
if $clen != $expected_clen |
689
|
0 |
0 |
unless $dconn = $dhost->http_conn_get |
693
|
0 |
0 |
unless ($dsock->write($put)) |
694
|
0 |
0 |
if $dconn->retryable and $dtries == 1 |
701
|
0 |
0 |
if $remain < $bytes_to_read |
706
|
0 |
0 |
unless (defined $bytes) |
709
|
0 |
0 |
if ($bytes == 0) |
715
|
0 |
0 |
if $remain < $bytes_to_read |
716
|
0 |
0 |
if $digest |
722
|
0 |
0 |
unless (defined $wbytes) |
725
|
0 |
0 |
if not $wcount and $dconn->retryable and $dtries == 1 |
731
|
0 |
0 |
if $data_len == $wbytes |
737
|
0 |
0 |
if $bytes_to_read < 0 |
741
|
0 |
0 |
if ($$sres{'keep'}) { } |
749
|
0 |
0 |
if $digest |
751
|
0 |
0 |
if ($fid_checksum) |
752
|
0 |
0 |
if ($digest ne $$fid_checksum{'checksum'}) |
761
|
0 |
0 |
unless ($dres) |
762
|
0 |
0 |
if not $wcount and $dconn->retryable and $dtries == 1 |
768
|
0 |
0 |
if ($$dres{'len'}) |
770
|
0 |
0 |
if (defined $r) { } |
771
|
0 |
0 |
if ($r != $$dres{'len'}) |
782
|
0 |
0 |
if ($$dres{'keep'}) { } |
789
|
0 |
0 |
if ($$dres{'code'} >= 200 and $$dres{'code'} <= 299) |
790
|
0 |
0 |
if ($digest) |
793
|
0 |
0 |
if ($$ddev{'reject_bad_md5'} and $alg eq 'MD5') |
800
|
0 |
0 |
if ($actual ne $digest) |