{"record":{"id":"5c4c43747abde977","repo":"risingwavelabs/risingwave","slug":"alter-streaming-enable-unaligned-join-is-only-supp","errorCode":null,"errorMessage":"ALTER STREAMING ENABLE UNALIGNED JOIN is only supported in debug mode","messagePattern":"ALTER STREAMING ENABLE UNALIGNED JOIN is only supported in debug mode","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/handler/alter_streaming_enable_unaligned_join.rs","lineNumber":80,"sourceCode":"                        // Other relation types (Subquery, Join, etc.) are not directly describable.\n                        return Err(not_found_err.into());\n                    }\n                }\n            } else if let Ok(sink) = binder.bind_sink_by_name(name.clone()) {\n                sink.sink_catalog.id.as_job_id()\n            } else {\n                return Err(not_found_err.into());\n            }\n        };\n        let meta_client = session.env().meta_client();\n        meta_client\n            .set_sync_log_store_aligned(job_id, !enable)\n            .await?;\n        Ok(PgResponse::empty_result(\n            StatementType::ALTER_MATERIALIZED_VIEW,\n        ))\n    } else {\n        bail!(\"ALTER STREAMING ENABLE UNALIGNED JOIN is only supported in debug mode\");\n    }\n}\n","sourceCodeStart":62,"sourceCodeEnd":83,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/handler/alter_streaming_enable_unaligned_join.rs#L62-L83","documentation":"The unaligned-join toggle is a debugging/testing-only feature guarded by cfg!(debug_assertions). In release builds of RisingWave the handler short-circuits and bails unconditionally, because the feature is not considered production-safe. This is a build-mode restriction, not a SQL or permission problem.","triggerScenarios":"Executing `ALTER STREAMING ENABLE/DISABLE UNALIGNED JOIN ...` against a RisingWave binary compiled in release mode (cargo build --release, official release packages, most production deployments).","commonSituations":"Developer reads about the unaligned-join debug knob and tries it on a production/release cluster; CI or staging runs a release artifact while the docs were written for a locally built debug binary.","solutions":["Build RisingWave from source in debug mode (./risedev build or cargo build without --release) and run the statement against that instance.","Do not use unaligned join in production; restructure the query or accept aligned join behavior instead.","If you only need the log-store alignment semantics, use supported production configuration options rather than this debug toggle."],"exampleFix":"// before (release binary)\ncargo build --release && ./risedev d  # then: ALTER STREAMING ENABLE UNALIGNED JOIN mv;\n// after (debug binary)\ncargo build && ./risedev d  # then: ALTER STREAMING ENABLE UNALIGNED JOIN mv;","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    await client.query('ALTER STREAMING ENABLE UNALIGNED JOIN my_mv');\n} catch (e) {\n    if (e.message.includes('only supported in debug mode')) {\n        // running a release build: skip or restructure the query instead\n    } else {\n        throw e;\n    }\n}","preventionTips":["Never rely on unaligned join in production code paths; it is debug-only.","Gate any debug-only SQL in tooling behind a build-mode check (cfg!(debug_assertions) equivalent / version string).","Treat this error as a signal to redesign the query rather than to retry."],"tags":["risingwave","debug-mode","feature-gate","not-supported"],"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"}