{"record":{"id":"9f474444e05afa0a","repo":"risingwavelabs/risingwave","slug":"empty-commit-metadata","errorCode":null,"errorMessage":"empty commit metadata","messagePattern":"empty commit metadata","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/meta/src/manager/sink_coordination/handle.rs","lineNumber":137,"sourceCode":"                .ok_or_else(|| anyhow!(\"end of request stream\"))?\n                .map_err(anyhow::Error::from)?;\n            let request = request.msg.ok_or_else(|| anyhow!(\"None msg in request\"))?;\n            match &request {\n                coordinate_request::Msg::StartRequest(_)\n                | coordinate_request::Msg::Stop(_)\n                | coordinate_request::Msg::AlignInitialEpochRequest(_) => {}\n                coordinate_request::Msg::CommitRequest(request) => {\n                    if let Some(prev_epoch) = self.prev_epoch\n                        && request.epoch < prev_epoch\n                    {\n                        return Poll::Ready(Err(anyhow!(\n                            \"invalid commit epoch {}, prev_epoch {}\",\n                            request.epoch,\n                            prev_epoch\n                        )));\n                    }\n                    if request.metadata.is_none() {\n                        return Poll::Ready(Err(anyhow!(\"empty commit metadata\")));\n                    };\n                    self.prev_epoch = Some(request.epoch);\n                }\n                coordinate_request::Msg::UpdateVnodeRequest(request) => {\n                    let bitmap = Bitmap::from(\n                        request\n                            .vnode_bitmap\n                            .as_ref()\n                            .ok_or_else(|| anyhow!(\"empty vnode bitmap\"))?,\n                    );\n                    self.vnode_bitmap = bitmap;\n                }\n            };\n            request\n        };\n        Poll::Ready(result)\n    }\n}","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/manager/sink_coordination/handle.rs#L119-L155","documentation":"A `CommitRequest` must carry commit `metadata` (e.g. serialized vnode bitmap and epoch state for the sink), and this error fires when `request.metadata` is None. Without it the coordinator cannot record the commit's metadata for recovery. It signals either a sender bug or an incompatible message version.","triggerScenarios":"A `CommitRequest` with `metadata: None` is polled from the request stream after passing the epoch monotonicity check.","commonSituations":"Older sink executor version that predates the metadata field talking to a newer meta node; executor bug where metadata fails to serialize and is silently set to None; manually crafted or replayed messages in tests.","solutions":["Upgrade all sink executors to a version that populates `CommitRequest.metadata`.","Fix the executor code path that builds the commit metadata so it always sets the field before sending.","Add executor-side validation to fail fast if metadata would be None rather than sending the request.","Confirm protobuf definitions are identical across components (no field renumbering/shadowing)."],"exampleFix":"// before\nCoordinateRequest { msg: Some(coordinate_request::Msg::CommitRequest(CommitRequest { epoch, metadata: None })) }\n// after\nCoordinateRequest { msg: Some(coordinate_request::Msg::CommitRequest(CommitRequest { epoch, metadata: Some(metadata) })) }","handlingStrategy":"validation","validationCode":"// Executor side: refuse to send a commit without metadata\nassert!(metadata.is_some(), \"CommitRequest.metadata must be populated\");","typeGuard":null,"tryCatchPattern":"if let Err(e) = coordinator_next_request() {\n    if e.to_string().contains(\"empty commit metadata\") {\n        tracing::error!(\"executor sent CommitRequest without metadata; check executor version\");\n    }\n}","preventionTips":["Populate CommitRequest.metadata before every send; fail fast if None","Keep executor and meta node versions aligned","Test the commit path after protobuf schema changes"],"tags":["rust","meta","protobuf","missing-field","sink-commit-protocol"],"backgroundTag":"missing-required-argument","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"}