risingwave_meta::manager::env

Function is_first_launch_for_sql_backend_cluster

source
pub async fn is_first_launch_for_sql_backend_cluster(
    sql_meta_store: &SqlMetaStore,
) -> MetaResult<bool>
Expand description

This function is_first_launch_for_sql_backend_cluster is used to check whether the cluster, which uses SQL as the backend, is a new cluster. It determines this by inspecting the applied migrations. If the migration m20230908_072257_init has been applied, then it is considered an old cluster.

Note: this check should be performed before Migrator::up().