risingwavelabs/risingwave · error · anyhow::Error
None msg in request
Error message
None msg in request
What it means
The coordinator received a `CoordinateRequest` whose oneof `msg` field was unset (None). Protobuf oneof fields can be absent when a peer sends an empty/default message, and the coordinator cannot dispatch a message with no variant. This indicates a protocol violation by the sender.
Source
Thrown at src/meta/src/manager/sink_coordination/handle.rs:121
}
pub(super) fn stop(&mut self) -> anyhow::Result<()> {
self.response_tx
.send(Ok(CoordinateResponse {
msg: Some(coordinate_response::Msg::Stopped(true)),
}))
.map_err(|_| anyhow!("failed to send the stopped response"))
}
pub(super) fn poll_next_request(
&mut self,
cx: &mut Context<'_>,
) -> Poll<anyhow::Result<coordinate_request::Msg>> {
let result = try {
let request = ready!(self.request_stream.try_poll_next_unpin(cx))
.ok_or_else(|| anyhow!("end of request stream"))?
.map_err(anyhow::Error::from)?;
let request = request.msg.ok_or_else(|| anyhow!("None msg in request"))?;
match &request {
coordinate_request::Msg::StartRequest(_)
| coordinate_request::Msg::Stop(_)
| coordinate_request::Msg::AlignInitialEpochRequest(_) => {}
coordinate_request::Msg::CommitRequest(request) => {
if let Some(prev_epoch) = self.prev_epoch
&& request.epoch < prev_epoch
{
return Poll::Ready(Err(anyhow!(
"invalid commit epoch {}, prev_epoch {}",
request.epoch,
prev_epoch
)));
}
if request.metadata.is_none() {
return Poll::Ready(Err(anyhow!("empty commit metadata")));
};
self.prev_epoch = Some(request.epoch);View on GitHub (pinned to 6469eb736d)
Solutions
- Check that all sink executors and meta nodes run the same RisingWave version (protobuf definitions in sync).
- Inspect the sender code path that builds `CoordinateRequest` and ensure it always sets `msg`.
- Reproduce with debug logging on the coordinate stream to capture the raw message before dispatch.
- If a protobuf schema change is in flight, regenerate `prost` types consistently on both sides.
Example fix
// before
CoordinateRequest { msg: None }
// after
CoordinateRequest { msg: Some(coordinate_request::Msg::StartRequest(Default::default())) } Defensive patterns
Strategy: validation
Validate before calling
// Sender side: always set msg before sending
let request = CoordinateRequest { msg: Some(msg) };
assert!(request.msg.is_some(), "CoordinateRequest must carry a msg"); Try / catch
match handle.poll_next_request(cx) {
Poll::Ready(Err(e)) if e.to_string().contains("None msg in request") => {
tracing::error!("peer sent empty CoordinateRequest; check version skew: {e:#}");
}
other => { /* normal handling */ }
} Prevention
- Always construct protobuf oneof messages with Some(variant)
- Keep protobuf definitions in sync across all components
- Add unit tests asserting every outgoing CoordinateRequest has a msg
When it happens
Trigger: A `CoordinateRequest` arrives over the request stream with all optional `msg` variants unset — e.g. the client constructed the message without setting `msg`, or a version mismatch drops the field during serialization.
Common situations: Mixed RisingWave versions (older executor sends a message shape the current meta does not expect); a client bug building `CoordinateRequest { msg: None }`; corrupted or truncated gRPC frames decoded as empty messages.
Understand the failure class
Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.
Related errors
- empty vnode bitmap
- failed to send the commit response for epoch {}
- failed to send the stopped response
- end of request stream
- empty commit metadata
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/f5261fe2d47c5bbe.
Report an issue: GitHub.