{"record":{"id":"1e60ebadb6cfae4e","repo":"risingwavelabs/risingwave","slug":"feature-feature-is-not-available-based-on-your-1e60eb","errorCode":null,"errorMessage":"feature {feature:?} is not available based on your license\n\nHint: You may want to set a license key with `ALTER SYSTEM SET license_key = '...';` command. For more information, visit https://go.risingwave.com/premium.","messagePattern":"feature (.+?) is not available based on your license\n\nHint: You may want to set a license key with `ALTER SYSTEM SET license_key = '\\.\\.\\.';` command\\. For more information, visit https://go\\.risingwave\\.com/premium\\.","errorType":"error_code","errorClass":"FeatureNotAvailable","httpStatus":null,"severity":"error","filePath":"src/license/src/feature.rs","lineNumber":75,"sourceCode":"    }\n\n    /// Get a slice of all features.\n    pub fn all() -> &'static [Feature] {\n        Feature::VARIANTS\n    }\n\n    /// Get a slice of all features available as of 2.5 (before we introduce custom tier).\n    pub(crate) fn all_as_of_2_5() -> &'static [Feature] {\n        // `IcebergCompaction` was the last feature introduced.\n        &Feature::all()[..=Feature::IcebergCompaction as usize]\n    }\n}\n\n/// The error type for feature not available due to license.\n#[derive(Debug, Error)]\npub enum FeatureNotAvailable {\n    // TODO(license): refine error message to include tier name & better instructions\n    #[error(\n        \"feature {feature:?} is not available based on your license\\n\\n\\\n        Hint: You may want to set a license key with `ALTER SYSTEM SET license_key = '...';` command. For more information, visit https://go.risingwave.com/premium.\"\n    )]\n    NotAvailable { feature: Feature },\n\n    #[error(\"feature {feature:?} is not available due to license error\")]\n    LicenseError {\n        feature: Feature,\n        source: LicenseError,\n    },\n}\n\nimpl Feature {\n    /// Check whether the feature is available based on the given license manager.\n    pub(crate) fn check_available_with(\n        self,\n        manager: &LicenseManager,\n    ) -> Result<(), FeatureNotAvailable> {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/license/src/feature.rs#L57-L93","documentation":"RisingWave's license gate raises FeatureNotAvailable::NotAvailable when code attempts to use a feature (e.g. a premium connector or enterprise capability) that the current license tier does not include. The message names the feature and points to the `ALTER SYSTEM SET license_key` command and the RisingWave premium page.","triggerScenarios":"Enabling or querying a gated Feature while running with no license key or a license key whose tier excludes the feature — e.g. `ALTER SYSTEM SET` of a premium setting or creating a source using a licensed connector.","commonSituations":"Deploying the community edition and trying enterprise features; license key expired or tier downgraded; forgot to set license_key after cluster setup.","solutions":["Set a valid license key: ALTER SYSTEM SET license_key = '...';","Verify current license status via `SHOW license_key;` / license system view.","If the key is valid but the feature is excluded, upgrade the license tier with RisingWave sales.","If using community edition intentionally, avoid enabling the gated feature or find an OSS alternative."],"exampleFix":"-- before\nCREATE SOURCE ... WITH (connector = 'gcp-pubsub');  -- feature gated\n-- after\nALTER SYSTEM SET license_key = 'xxxx-xxxx';\nCREATE SOURCE ... WITH (connector = 'gcp-pubsub');","handlingStrategy":"try-catch","validationCode":"Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(\"SHOW license_key\"); if (rs.next() && rs.getString(1).isEmpty()) throw new IllegalStateException(\"license key not set\");","typeGuard":null,"tryCatchPattern":"try { enableFeature(); } catch (SQLException e) { if (e.getMessage().contains(\"not available based on your license\")) { /* prompt for license key */ } }","preventionTips":["Set the license key right after cluster provisioning","Periodically check license status and expiry","Know which features your tier covers before enabling them"],"tags":["license","feature-gate","risingwave"],"backgroundTag":"feature-not-enabled","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"}