From 0126fd93a196e65ecd369109eb32c78903f3a59f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 12 Jul 2012 16:33:27 -0700 Subject: [PATCH] [FileBackend] Made copy script retry on batch copy failure. Change-Id: I5db35371a41fa72d449cba1fb7e15f19f0cefa21 --- maintenance/copyFileBackend.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index 184bf3d8ed..548a33b358 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -153,6 +153,10 @@ class CopyFileBackend extends Maintenance { $t_start = microtime( true ); $status = $dst->doQuickOperations( $ops ); + if ( !$status->isOK() ) { + sleep( 10 ); // wait and retry copy again + $status = $dst->doQuickOperations( $ops ); + } $ellapsed_ms = floor( ( microtime( true ) - $t_start ) * 1000 ); if ( !$status->isOK() ) { $this->error( print_r( $status->getErrorsArray(), true ) ); -- 2.20.1