Ordinary database engine is deprecated but there is no simple mean to change database engine to Atomic for existing databases.

Possible options:
- ALTER DATABASE MODIFY ENGINE query.
- Flag that triggers migration at ClickHouse startup.

The latter should be easier to implement. 

{
            shutdown();
        }
        catch (...)
        {
            std::terminate();
        }
        
        throw;
    }
}
void StorageReplicatedMergeTree::flush()
{
    if (flush_called.exchange(true))
        return;
    flushAllInMemoryPartsIfNeeded();
}
void StorageReplicatedMergeTree::shutdown()
{
    if (shutdown_called.exchange(true))
        return;
    
    fetcher.blocker.cancelForever();
    merger_mutator.merges_blocker.cancelForever();
    parts_mover.moves_blocker.cancelForever();
    mutations_finalizing_task->deactivate();
    stopBeingLeader();
    restarting_thread.shutdown();
    background_operations_assignee.finish();
    part_moves_between_shards_orchestrator.shutdown();