{"record":{"id":"c5828d364d422277","repo":"risingwavelabs/risingwave","slug":"should-have-meta-client","errorCode":null,"errorMessage":"should have meta client","messagePattern":"should have meta client","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"src/connector/src/sink/coordinate.rs","lineNumber":56,"sourceCode":"    param: SinkParam,\n    vnode_bitmap: Bitmap,\n    commit_checkpoint_interval: NonZeroU64,\n    sink_writer_metrics: SinkWriterMetrics,\n}\n\nimpl<W: SinkWriter<CommitMetadata = Option<SinkMetadata>>> CoordinatedLogSinker<W> {\n    pub async fn new(\n        writer_param: &SinkWriterParam,\n        param: SinkParam,\n        writer: W,\n        commit_checkpoint_interval: NonZeroU64,\n    ) -> Result<Self> {\n        Ok(Self {\n            writer,\n            sink_coordinate_client: writer_param\n                .meta_client\n                .as_ref()\n                .ok_or_else(|| anyhow!(\"should have meta client\"))?\n                .clone()\n                .sink_coordinate_client()\n                .await,\n            param,\n            // Singleton actors do not carry a vnode bitmap. For sink coordination, the only\n            // writer owns the singleton fragment's sole vnode.\n            vnode_bitmap: writer_param\n                .vnode_bitmap\n                .clone()\n                .unwrap_or_else(|| Bitmap::singleton().clone()),\n            commit_checkpoint_interval,\n            sink_writer_metrics: SinkWriterMetrics::new(writer_param),\n        })\n    }\n}\n\n#[async_trait]\nimpl<W: SinkWriter<CommitMetadata = Option<SinkMetadata>>> LogSinker for CoordinatedLogSinker<W> {","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/coordinate.rs#L38-L74","documentation":"The sink coordinator requires a meta client to create a SinkCoordinateClient for communicating with the meta service during distributed sink coordination. `writer_param.meta_client` is an Option; batch/simple-actor contexts may not supply one, so the constructor explicitly rejects building a coordinating sink writer without it.","triggerScenarios":"Constructing the sink coordinator (SinkCoordinator new / from writer_param) when writer_param.meta_client is None, i.e. the writer was created in a context that does not attach a meta client (e.g. non-distributed sink paths or tests).","commonSituations":"Running a sink in an environment/test harness where the actor's WriterParam was built without a meta client; misconfigured cluster where the meta node is not wired to the compute node creating the sink writer.","solutions":["Ensure the actor/stream environment attaches a meta client to WriterParam before creating the sink writer.","If the sink does not need coordination, use a sink path/writer type that does not require a coordinator.","In tests, provide a mock/in-memory meta client instead of None."],"exampleFix":"// before\nlet writer_param = WriterParam { meta_client: None, .. };\n// after\nlet writer_param = WriterParam { meta_client: Some(meta_client), .. };","handlingStrategy":"validation","validationCode":"if writer_param.meta_client.is_none() {\n    return Err(anyhow!(\"sink coordination requires a meta client\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always build WriterParam through the standard actor-creation path that attaches the meta client.","In tests, wire in a mock meta client rather than leaving the field None."],"tags":["rust","risingwave","sink","configuration"],"backgroundTag":"missing-required-config","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}