Skip to content

Commit 9d27333

Browse files
committed
Add usleep for checksum cycle.
1 parent 8cfc6be commit 9d27333

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ backup_data_file(const char *from_root, const char *to_root,
194194
if (try_checksum)
195195
{
196196
elog(WARNING, "File: %s blknum %u have wrong checksum, try again", file->path, blknum);
197+
usleep(100);
197198
fseek(in, -sizeof(page), SEEK_CUR);
198199
fread(&page, 1, sizeof(page), in);
199200
}
@@ -281,8 +282,6 @@ backup_data_file(const char *from_root, const char *to_root,
281282
int i;
282283

283284
for(i=0; i<BLCKSZ && page.data[i] == 0; i++);
284-
285-
286285
if (i == BLCKSZ)
287286
{
288287
elog(WARNING, "File: %s blknum %u, empty page", file->path, blknum);
@@ -306,6 +305,7 @@ backup_data_file(const char *from_root, const char *to_root,
306305
if (try_checksum)
307306
{
308307
elog(WARNING, "File: %s blknum %u have wrong page header, try again", file->path, blknum);
308+
usleep(100);
309309
fseek(in, -sizeof(page), SEEK_CUR);
310310
fread(&page, 1, sizeof(page), in);
311311
continue;

0 commit comments

Comments
 (0)