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 

PartitionCommandsResultInfo unfreezePartition(
        const ASTPtr & partition,
        const String & backup_name,
        ContextPtr context,
        TableLockHolder & table_lock_holder);
    
    PartitionCommandsResultInfo unfreezeAll(
        const String & backup_name,
        ContextPtr context,
        TableLockHolder & table_lock_holder);
    
    BackupEntries backup(const ASTs & partitions, ContextPtr context) override;
    static BackupEntries backupDataParts(const DataPartsVector & data_parts);
    
    RestoreDataTasks restoreDataPartsFromBackup(
        const BackupPtr & backup,
        const String & data_path_in_backup,
        const std::unordered_set<String> & partition_ids,
        SimpleIncrement * increment);
    
    void movePartitionToDisk(const ASTPtr & partition, const String & name, bool moving_part, ContextPtr context);
    
    void movePartitionToVolume(const ASTPtr & partition, const String & name, bool moving_part, ContextPtr context);
    void checkPartitionCanBeDropped(const ASTPtr & partition) override;
    void checkPartCanBeDropped(const String & part_name);
    Pipe alterPartition(
        const StorageMetadataPtr & metadata_snapshot,
        const PartitionCommands & commands,
        ContextPtr query_context) override;
    size_t getColumnCompressedSize(const std::string & name) const