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 

zkutil::ZooKeeper & zookeeper, String & partition_id, LogEntry & entry, ContextPtr query_context, bool detach)
{
    
    for (size_t retry = 0; retry < 1000; ++retry)
    {
        String alter_partition_version_path = zookeeper_path + "/alter_partition_version";
        Coordination::Stat alter_partition_version_stat;
        zookeeper.get(alter_partition_version_path, &alter_partition_version_stat);
        MergeTreePartInfo drop_range_info;
        
        std::optional<EphemeralLockInZooKeeper> delimiting_block_lock;
        if (!getFakePartCoveringAllPartsInPartition(partition_id, drop_range_info, delimiting_block_lock))
        {
            LOG_INFO(log, "Will not drop partition {}, it is empty.", partition_id);
            return false;
        }
        clearBlocksInPartition(zookeeper, partition_id, drop_range_info.min_block, drop_range_info.max_block);
        String drop_range_fake_part_name = getPartNamePossiblyFake(format_version, drop_range_info);
        LOG_DEBUG(log, "Disabled merges covered by range {}", drop_range_fake_part_name);
        
        entry.type = LogEntry::DROP_RANGE;
        entry.source_replica = replica_name;
        entry.new_part_name = drop_range_fake_part_name;
        entry.detach = detach;
        entry.create_time = time(nullptr);