risingwave_meta::controller::utils

Function validate_subscription_deletion

source
pub async fn validate_subscription_deletion<C>(
    txn: &C,
    subscription_id: ObjectId,
) -> MetaResult<()>
where C: ConnectionTrait,
Expand description

Validate that subscription can be safely deleted, meeting any of the following conditions:

  1. The upstream table is not referred to by any cross-db mv.
  2. After deleting the subscription, the upstream table still has at least one subscription.