#34528

**Describe the bug**
[A link to the report](https://s3.amazonaws.com/clickhouse-test-reports/34528/6a8e35930ffc25f0574179c5ad93635cfe073121/stress_test__thread__actions_.html)


{
            
            for (const auto & data_file : data_files)
            {
                String file_path_in_backup = data_path_in_backup + fileName(data_file.path);
                auto backup_entry = backup->readFile(file_path_in_backup);
                auto in = backup_entry->getReadBuffer();
                auto out = disk->writeFile(data_file.path, max_compress_block_size, WriteMode::Append);
                copyData(*in, *out);
            }
            if (use_marks_file)
            {
                
                size_t num_extra_marks = 0;
                String file_path_in_backup = data_path_in_backup + fileName(marks_file_path);
                size_t file_size = backup->getFileSize(file_path_in_backup);
                if (file_size % (num_data_files * sizeof(Mark)) != 0)
                    throw Exception("Size of marks file is inconsistent", ErrorCodes::SIZES_OF_MARKS_FILES_ARE_INCONSISTENT);
                num_extra_marks = file_size / (num_data_files * sizeof(Mark));
                size_t num_marks = data_files[0].marks.size();
                for (auto & data_file : data_files)
                    data_file.marks.reserve(num_marks + num_extra_marks);
                std::vector<size_t> old_data_sizes;
                std::vector<size_t> old_num_rows;
                old_data_sizes.resize(num_data_files);
                old_num_rows.resize(num_data_files);
                for (size_t i = 0; i != num_data_files; ++i)
                {
                    old_data_sizes[i] = file_checker.getFileSize(data_files[i].path);
                    old_num_rows[i] = num_marks ? data_files[i].marks[num_marks - 1].rows : 0;