{"record":{"id":"bee2d1470a1722b9","repo":"risingwavelabs/risingwave","slug":"only-the-table-sink-subscription-view-and-index","errorCode":null,"errorMessage":"only the table, sink, subscription, view and index will depend on other objects.","messagePattern":"only the table, sink, subscription, view and index will depend on other objects\\.","errorType":"exception","errorClass":"MetaError","httpStatus":null,"severity":"error","filePath":"src/meta/src/controller/utils.rs","lineNumber":2271,"sourceCode":"                rename_relation_ref!(\n                    Subscription,\n                    subscription,\n                    subscription_id,\n                    obj.oid.as_subscription_id()\n                )\n            }\n            ObjectType::View => rename_relation_ref!(View, view, view_id, obj.oid.as_view_id()),\n            ObjectType::Index => {\n                let index_table_id: Option<TableId> = Index::find_by_id(obj.oid.as_index_id())\n                    .select_only()\n                    .column(index::Column::IndexTableId)\n                    .into_tuple()\n                    .one(txn)\n                    .await?;\n                rename_relation_ref!(Table, table, table_id, index_table_id.unwrap());\n            }\n            _ => {\n                bail!(\n                    \"only the table, sink, subscription, view and index will depend on other objects.\"\n                )\n            }\n        }\n    }\n\n    Ok(to_update_relations)\n}\n\n/// Validate that subscription can be safely deleted, meeting any of the following conditions:\n/// 1. The upstream table is not referred to by any cross-db mv.\n/// 2. After deleting the subscription, the upstream table still has at least one subscription.\npub async fn validate_subscription_deletion<C>(\n    txn: &C,\n    subscription_id: SubscriptionId,\n) -> MetaResult<()>\nwhere\n    C: ConnectionTrait,","sourceCodeStart":2253,"sourceCodeEnd":2289,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/controller/utils.rs#L2253-L2289","documentation":"During object rename, the transactional helper only knows how to update dependent rows for tables, sinks, subscriptions, views and indexes; any other dependent object type hits the `_` arm and bails with \"only the table, sink, subscription, view and index will depend on other objects.\". It marks an unsupported rename dependency rather than silently skipping reference updates.","triggerScenarios":"Renaming an object (e.g. via ALTER ... RENAME or the rename path in utils.rs) where a dependent relation of an unsupported type references it — the match over the dependent object's type falls through to the default arm.","commonSituations":"Adding a new relation type without extending the rename logic; internal/automated rename of an exotic object; version skew between components creating dependencies the rename code does not cover.","solutions":["Add a match arm (or reuse the `rename_relation_ref!` macro) for the unsupported dependent type so references are updated during rename.","Avoid renaming objects that are referenced by unsupported dependent types; drop and recreate with the new name instead.","Upgrade meta to a version whose rename path covers the object types present in your cluster.","Inspect the operation's object types to confirm which dependent type fell through, and extend tests for that rename path."],"exampleFix":"// before\n_ => bail!(\"only the table, sink, subscription, view and index will depend on other objects.\"),\n// after\nSchema => { rename_schema_ref!(...); }\n_ => bail!(\"only the table, sink, subscription, view and index will depend on other objects.\"),","handlingStrategy":"validation","validationCode":"// Restrict rename to supported dependent types\nif !matches!(dep_type, Table | Sink | Subscription | View | Index) {\n    return Err(\"rename unsupported for this dependent object type\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Extend the rename match arms when introducing new relation types","Prefer drop-and-recreate over rename for unsupported dependencies","Add planner/e2e tests covering rename for every object type you use"],"tags":["meta","rename","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}