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::shuffle(candidates.begin(), candidates.end(), thread_local_rng);
            String selected_disk_name = candidates.front();
            WriteBufferFromOwnString log_str;
            writeCString("\nbalancer: \n", log_str);
            for (const auto & [disk_name, per_disk_parts] : disk_parts_for_logging)
                writeString(fmt::format("  {}: [{}]\n", disk_name, fmt::join(per_disk_parts, ", ")), log_str);
            LOG_DEBUG(log, log_str.str());
            if (ttl_infos)
                reserved_space = tryReserveSpacePreferringTTLRules(
                    metadata_snapshot,
                    part_size,
                    *ttl_infos,
                    time(nullptr),
                    max_volume_index,
                    is_insert,
                    getStoragePolicy()->getDiskByName(selected_disk_name));
            else
                reserved_space = tryReserveSpace(part_size, getStoragePolicy()->getDiskByName(selected_disk_name));
            if (reserved_space)
            {
                currently_emerging_big_parts.emplace(
                    part_name, EmergingPartInfo{reserved_space->getDisk(0)->getName(), part_info.partition_id, part_size});
                for (const auto & part : covered_parts)
                {
                    if (currently_submerging_big_parts.count(part))
                        LOG_WARNING(log, "currently_submerging_big_parts contains duplicates. JBOD might lose balance");
                    else
                        currently_submerging_big_parts.insert(part);