https://clickhouse-test-reports.s3.yandex.net/19475/02d28c1f9b9558ca5af267167a542819b9e1d061/fuzzer_debug/report.html#fail1
{
    SortedFiles files;
    BlocksList blocks;
    
    {
        std::unique_lock lock{insert_mutex};
        files.swap(sorted_files);
        blocks.swap(inserted_blocks.blocks);
        inserted_blocks.clear();
        flush_condvar.wait(lock, [&]{ return !flush_inflight; });
    }
    
    if (!blocks.empty())
        files.emplace_back(flush(blocks));
    BlockInputStreams inputs;
    inputs.reserve(num_files_for_merge);
    
    {
        SortedFiles new_files;
        new_files.reserve(files.size() / num_files_for_merge + 1);
        while (files.size() > num_files_for_merge)
        {
            for (const auto & file : files)
            {
                inputs.emplace_back(streamFromFile(file));