{"record":{"id":"5ddfbf32b21a56a0","repo":"risingwavelabs/risingwave","slug":"feature-feature-is-not-available-due-to-licens","errorCode":null,"errorMessage":"feature {feature:?} is not available due to license error","messagePattern":"feature (.+?) is not available due to license error","errorType":"error_code","errorClass":"FeatureNotAvailable","httpStatus":null,"severity":"error","filePath":"src/license/src/feature.rs","lineNumber":81,"sourceCode":"\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> {\n        let check_res = match manager.license() {\n            Ok(license) => {\n                if license.tier.available_features().any(|x| x == self) {\n                    Ok(())\n                } else {\n                    Err(FeatureNotAvailable::NotAvailable { feature: self })","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/license/src/feature.rs#L63-L99","documentation":"FeatureNotAvailable::LicenseError wraps a lower-level LicenseError that occurred while evaluating whether a feature is available (e.g. the license key is corrupt, expired, or fails signature validation). Unlike NotAvailable, the gate itself could not be evaluated because license processing failed.","triggerScenarios":"Attempting to use a gated feature while the stored license key fails to load/validate — expired key, malformed key string, or signature verification failure inside the license module.","commonSituations":"Typo or truncation when pasting the license key into ALTER SYSTEM SET; license expired between checks; license service/tenant mismatch.","solutions":["Check the wrapped source LicenseError for the exact cause (expired vs malformed).","Re-set the license key: ALTER SYSTEM SET license_key = '<valid key>';","Verify the key has not expired and matches the deployment/tenant.","Contact RisingWave support if a valid key still fails validation."],"exampleFix":"-- before\nALTER SYSTEM SET license_key = 'corrupt-or-expired-key';\n-- after\nALTER SYSTEM SET license_key = 'currently-valid-license-key';","handlingStrategy":"try-catch","validationCode":"Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(\"SHOW license_key\"); if (rs.next()) validateKeyFormat(rs.getString(1));","typeGuard":null,"tryCatchPattern":"try { enableFeature(); } catch (SQLException e) { if (e.getMessage().contains(\"due to license error\")) { /* re-set or replace license key */ } }","preventionTips":["Copy license keys carefully (no truncation/whitespace)","Track license expiry dates and renew before they lapse","Log and inspect the wrapped source LicenseError for root cause"],"tags":["license","license-key","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"}