risingwavelabs/risingwave · error · anyhow::Error
should get commit response but get {:?}
Error message
should get commit response but get {:?} What it means
SinkCoordinateClient::commit sends a Commit request over the sink coordination stream and then awaits the next response. If the response is not a CommitResponse, it errors. This means the coordinator replied with an unexpected message type (or the stream desynchronized), so the commit's outcome is unknown.
Source
Thrown at src/rpc_client/src/sink_coordinate_client.rs:114
pub async fn commit(
&mut self,
epoch: u64,
metadata: SinkMetadata,
schema_change: Option<PbSinkSchemaChange>,
) -> anyhow::Result<()> {
self.send_request(CoordinateRequest {
msg: Some(coordinate_request::Msg::CommitRequest(CommitRequest {
epoch,
metadata: Some(metadata),
schema_change,
})),
})
.await?;
match self.next_response().await? {
CoordinateResponse {
msg: Some(coordinate_response::Msg::CommitResponse(_)),
} => Ok(()),
msg => Err(anyhow!("should get commit response but get {:?}", msg)),
}
}
pub async fn update_vnode_bitmap(&mut self, vnode_bitmap: &Bitmap) -> anyhow::Result<u64> {
self.send_request(CoordinateRequest {
msg: Some(coordinate_request::Msg::UpdateVnodeRequest(
UpdateVnodeBitmapRequest {
vnode_bitmap: Some(vnode_bitmap.to_protobuf()),
},
)),
})
.await?;
match self.next_response().await? {
CoordinateResponse {
msg:
Some(coordinate_response::Msg::StartResponse(StartCoordinationResponse {
log_store_rewind_start_epoch,
})),View on GitHub (pinned to 6469eb736d)
Solutions
- Inspect the debug-printed response in the message to identify what the coordinator actually returned
- Recreate the SinkCoordinateClient stream (the protocol state machine is likely desynced) and retry the epoch
- Check coordinator logs for errors around the commit; verify compute node and meta versions match
Defensive patterns
Strategy: try-catch
Try / catch
// Rust
match client.commit().await {
Ok(()) => {},
Err(e) if e.to_string().starts_with("should get commit response") => {
tracing::warn!("commit desynced: {e:#}; rebuilding coordination stream");
client = rebuild_sink_coordinate_client().await?;
client.commit().await?;
}
Err(e) => return Err(e),
} Prevention
- Keep one request/response round-trip at a time on the coordination stream
- Align component versions across upgrades
- Log unexpected coordinator responses for triage
When it happens
Trigger: Calling SinkCoordinateClient::commit when the coordinator sends a different CoordinateResponse variant — e.g. stream out-of-order after prior failed round-trips, coordinator restart, or protocol mismatch between client and stream engine versions.
Common situations: Sink coordinator crashed and re-answered with an error-shaped message; interleaving requests on a shared stream; version skew between compute node and meta after upgrade.
Related errors
- should get Sync response but get {:?}
- should get Commit response but get {:?}
- should get start response but get {:?}
- should get AlignInitialEpochResponse but get {:?}
- get none metadata in commit response for coordinated sink wr
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/6c9f5fbfcec5308b.
Report an issue: GitHub.