Skip to content

Commit 83d64c5

Browse files
committed
Function pg_atomic_test_set_flag returns true if the flag has successfully been set, false otherwise
1 parent 9a1e5ba commit 83d64c5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/backup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ remote_backup_files(void *arg)
383383
if (S_ISDIR(file->mode))
384384
continue;
385385

386-
if (pg_atomic_test_set_flag(&file->lock))
386+
if (!pg_atomic_test_set_flag(&file->lock))
387387
continue;
388388

389389
file_backup_conn = pgut_connect_replication(pgut_dbname);

src/restore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ restore_files(void *arg)
710710
char *rel_path;
711711
pgFile *file = (pgFile *) parray_get(arguments->files, i);
712712

713-
if (pg_atomic_test_set_flag(&file->lock))
713+
if (!pg_atomic_test_set_flag(&file->lock))
714714
continue;
715715

716716
pgBackupGetPath(arguments->backup, from_root,

src/validate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pgBackupValidateFiles(void *arg)
139139
struct stat st;
140140

141141
pgFile *file = (pgFile *) parray_get(arguments->files, i);
142-
if (pg_atomic_test_set_flag(&file->lock))
142+
if (!pg_atomic_test_set_flag(&file->lock))
143143
continue;
144144

145145
if (interrupted)

0 commit comments

Comments
 (0)