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 

const String & backup_name,
    ContextPtr local_context,
    TableLockHolder &)
{
    return unfreezePartitionsByMatcher([] (const String &) { return true; }, backup_name, local_context);
}
PartitionCommandsResultInfo MergeTreeData::unfreezePartitionsByMatcher(MatcherFn matcher, const String & backup_name, ContextPtr)
{
    auto backup_path = fs::path("shadow") / escapeForFileName(backup_name) / relative_data_path;
    LOG_DEBUG(log, "Unfreezing parts by path {}", backup_path.generic_string());
    PartitionCommandsResultInfo result;
    for (const auto & disk : getStoragePolicy()->getDisks())
    {
        if (!disk->exists(backup_path))
            continue;
        for (auto it = disk->iterateDirectory(backup_path); it->isValid(); it->next())
        {
            const auto & partition_directory = it->name();
            /
            auto found = partition_directory.find('_');
            if (found == std::string::npos)
                continue;
            auto partition_id = partition_directory.substr(0, found);