Index: /trunk/ippScripts/scripts/sc_remote_exec.pl
===================================================================
--- /trunk/ippScripts/scripts/sc_remote_exec.pl	(revision 37117)
+++ /trunk/ippScripts/scripts/sc_remote_exec.pl	(revision 37118)
@@ -209,5 +209,5 @@
 }
 close(RETURN);
-
+print STDERR "Expect $#dbinfo_files dbinfo files\n";
 # Binary search it.  BUT: We're binary searching binary values.  So,
 # this has to be far more careful than a fully sorted case would be.
@@ -221,31 +221,32 @@
 my $range = 20;  # How wide of a chunk to look through to catch threading drops
 my $offset = 0;  # Offset to start from.
-if (( stat($dbinfo_files[$last]) )[7] != 0) { $offset = $#dbinfo_files;}
-else {
-    my $count = 0;
-    while ($first < $last - $range) {
-
-	$mid = int(($last + $first)/2);
-	for (my $i = 0; $i <= $range; $i++) {
-	    my $size = (stat($dbinfo_files[$mid + $i]))[7];
-#	    print STDERR "$first $last $mid $i $size $dbinfo_files[$mid + $i]\n";
-	    if ($size == 0) { 
-		if ($last == $mid + $i) { 
-		    $first = $last - 1;
-		}
-		$last = $mid + $i; 
-		$i = $range + 10;
-	    }
-	}
-	if ($last > $mid + $range) { $first = $mid + $range; }
-	$count++;
-	if ($count > 200) { 
-	    &my_die("The iteration loop couldn't converge after 200 rounds, suggesting something has gone wrong.",
-		    $remote_id,4,"error_run");
-	}
-    }
-    $offset = $mid - $range; # Because I want to make sure I get to the beginning of the thread group.
-    $offset = $dbindex[$offset]; # Because we need to convert from dbinfo space to returned file space.
-}
+# This doesn't work as well as I'd like, and with the rsync, it's less needed.
+# if (( stat($dbinfo_files[$last]) )[7] != 0) { $offset = $#dbinfo_files;}
+# else {
+#     my $count = 0;
+#     while ($first < $last - $range) {
+
+# 	$mid = int(($last + $first)/2);
+# 	for (my $i = 0; $i <= $range; $i++) {
+# 	    my $size = (stat($dbinfo_files[$mid + $i]))[7];
+# #	    print STDERR "$first $last $mid $i $size $dbinfo_files[$mid + $i]\n";
+# 	    if ($size == 0) { 
+# 		if ($last == $mid + $i) { 
+# 		    $first = $last - 1;
+# 		}
+# 		$last = $mid + $i; 
+# 		$i = $range + 10;
+# 	    }
+# 	}
+# 	if ($last > $mid + $range) { $first = $mid + $range; }
+# 	$count++;
+# 	if ($count > 200) { 
+# 	    &my_die("The iteration loop couldn't converge after 200 rounds, suggesting something has gone wrong.",
+# 		    $remote_id,4,"error_run");
+# 	}
+#     }
+#     $offset = $mid - $range; # Because I want to make sure I get to the beginning of the thread group.
+#     $offset = $dbindex[$offset]; # Because we need to convert from dbinfo space to returned file space.
+# }
 
 # Feed teh return list into the transfer tool
@@ -255,5 +256,5 @@
 print "$return_push_output_print\n";
 
-#die();
+
 
 foreach my $file (@dbinfo_files) {
@@ -262,4 +263,5 @@
     close(DBF);
     chomp($cmd);
+#    print STDERR "$file $cmd\n";
     $cmd =~ s/-/ -/g; # This is just a safety check for missing space.
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -269,5 +271,5 @@
 	# Now we're going to drop the component that owns this dbinfo, which should force a retry.
 	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	warn("The command that shouldn't fail has failed: $cmd $remote_id $error_code");
+	warn("The command that shouldn't fail has failed: $file $cmd $remote_id $error_code");
 	drop_component($remote_id,$cmd,$file);
     }
