https://clickhouse-test-reports.s3.yandex.net/15348/34addcf61f653e50e493ff8d94fab015db91fa59/fuzzer/report.html#fail1
#endif
    ProfileEvents::increment(ProfileEvents::WriteBufferAIOWrite);
    ProfileEvents::increment(ProfileEvents::WriteBufferAIOWriteBytes, bytes_written);
    if (bytes_written != static_cast<decltype(bytes_written)>(block_size * write_buffer_size))
        throw Exception("Not all data was written for asynchronous IO on file " + path + BIN_FILE_EXT + ". returned: " + std::to_string(bytes_written), ErrorCodes::AIO_WRITE_ERROR);
    if (::fsync(fd) < 0)
        throwFromErrnoWithPath("Cannot fsync " + path + BIN_FILE_EXT, path + BIN_FILE_EXT, ErrorCodes::CANNOT_FSYNC);
    
    for (auto & key : keys_buffer)
    {
        Index index;
        if (key_to_index.getKeyAndValue(key, index))
        {
            if (index.inMemory()) 
            {
                index.setInMemory(false);
                index.setBlockId((current_file_block_id % max_size) + index.getBlockId());
            }
            key_to_index.set(key, index);
        }
    }
    current_file_block_id += write_buffer_size;
    current_memory_block_id = 0;
    
    keys_buffer.clear();
    keys_buffer_pool.reset();
    keys_buffer_pool.emplace();
}
template <typename Out, typename GetDefault>
void SSDComplexKeyCachePartition::getValue(