Skip to content

Commit 9c20466

Browse files
kulaginmfunny-falcon
authored andcommitted
[PBCKP-263] fix for tests.archive.ArchiveTest.test_archive_get_batching_sanity (#532)
1 parent 7aa7d7a commit 9c20466

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/archive.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ uint32 run_wal_prefetch(const char *prefetch_dir, const char *archive_dir,
969969

970970
/* init thread args */
971971
threads = (pthread_t *) palloc(sizeof(pthread_t) * num_threads);
972-
threads_args = (archive_get_arg *) palloc(sizeof(archive_get_arg) * num_threads);
972+
threads_args = (archive_get_arg *) palloc0(sizeof(archive_get_arg) * num_threads);
973973

974974
for (i = 0; i < num_threads; i++)
975975
{
@@ -980,6 +980,7 @@ uint32 run_wal_prefetch(const char *prefetch_dir, const char *archive_dir,
980980

981981
arg->thread_num = i+1;
982982
arg->files = batch_files;
983+
arg->n_fetched = 0;
983984
}
984985

985986
/* Run threads */

0 commit comments

Comments
 (0)