I am reading clickhouse mutation code. In StorageMergeTree->selectPartsToMutate() function, there is a check 
`if (current_ast_elements + commands_size >= max_ast_elements)
                break;`

I think if there are many mutations then the check result will be true, so that it will skip the remaining mutations.
But the new part's mutation is set to the last one in mutation map, and it does not apply the remaining mutations actually.
`new_part_info.mutation = current_mutations_by_version.rbegin()->first;`

Then the new part will miss the remaining mutations in future mutation job.

I think it's wrong here. Am I right?

If it is right, I will submit a PR 

std::make_unique<BackupEntryFromImmutableFile>(disk, hardlink_filepath, checksum.file_size, file_hash, temp_dir_owner));
        }
        for (const auto & filepath : part->getFileNamesWithoutChecksums())
        {
            String relative_filepath = fs::path(part->relative_path) / filepath;
            backup_entries.emplace_back(relative_filepath, std::make_unique<BackupEntryFromSmallFile>(disk, part_dir / filepath));
        }
    }
    return backup_entries;
}
RestoreDataTasks MergeTreeData::restoreDataPartsFromBackup(const BackupPtr & backup, const String & data_path_in_backup,
                                                           const std::unordered_set<String> & partition_ids,
                                                           SimpleIncrement * increment)
{
    RestoreDataTasks restore_tasks;
    Strings part_names = backup->listFiles(data_path_in_backup);
    for (const String & part_name : part_names)
    {
        const auto part_info = MergeTreePartInfo::tryParsePartName(part_name, format_version);
        if (!part_info)
            continue;
        if (!partition_ids.empty() && !partition_ids.contains(part_info->partition_id))
            continue;
        UInt64 total_size_of_part = 0;
        Strings filenames = backup->listFiles(data_path_in_backup + part_name + "/", "");
        for (const String & filename : filenames)
            total_size_of_part += backup->getFileSize(data_path_in_backup + part_name + "/" + filename);
        std::shared_ptr<IReservation> reservation = getStoragePolicy()->reserveAndCheck(total_size_of_part);
        auto restore_task = [this,
                             backup,