Skip to content

Commit 0df0f9a

Browse files
committed
Ugly fix (set missing_ok = true)
Previously, the return code was not checked when deleting files. Now, in order for the tests to work out, you need to ignore the missing files. This fix for tests: tests.retention.RetentionTest.test_window_merge_interleaved_incremental_chains_1 tests.retention.RetentionTest.test_window_chains tests.merge.MergeTest.test_smart_merge tests.merge.MergeTest.test_merge_tablespaces tests.merge.MergeTest.test_merge_pg_filenode_map tests.merge.MergeTest.test_failed_merge_after_delete_3 tests.merge.MergeTest.test_failed_merge_after_delete tests.merge.MergeTest.test_crash_after_opening_backup_control_2
1 parent 48639c7 commit 0df0f9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,7 @@ cleanup_tablespace(const char *path)
18171817

18181818
join_path_components(fullpath, path, file->rel_path);
18191819

1820-
if (fio_remove(FIO_DB_HOST, fullpath, false) == 0)
1820+
if (fio_remove(FIO_DB_HOST, fullpath, true) == 0)
18211821
elog(VERBOSE, "Deleted file \"%s\"", fullpath);
18221822
else
18231823
elog(ERROR, "Cannot delete file or directory \"%s\": %s", fullpath, strerror(errno));

src/merge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ merge_chain(InstanceState *instanceState,
809809
/* We need full path, file object has relative path */
810810
join_path_components(full_file_path, full_database_dir, full_file->rel_path);
811811

812-
if (fio_remove(FIO_BACKUP_HOST, full_file_path, false) == 0)
812+
if (fio_remove(FIO_BACKUP_HOST, full_file_path, true) == 0)
813813
elog(VERBOSE, "Deleted \"%s\"", full_file_path);
814814
else
815815
elog(ERROR, "Cannot delete file or directory \"%s\": %s", full_file_path, strerror(errno));
@@ -1145,7 +1145,7 @@ remove_dir_with_files(const char *path)
11451145

11461146
join_path_components(full_path, path, file->rel_path);
11471147

1148-
if (fio_remove(FIO_LOCAL_HOST, full_path, false) == 0)
1148+
if (fio_remove(FIO_LOCAL_HOST, full_path, true) == 0)
11491149
elog(VERBOSE, "Deleted \"%s\"", full_path);
11501150
else
11511151
elog(ERROR, "Cannot delete file or directory \"%s\": %s", full_path, strerror(errno));

0 commit comments

Comments
 (0)