{"record":{"id":"6bcd991e528c5977","repo":"risingwavelabs/risingwave","slug":"should-get-start-response-but-get","errorCode":null,"errorMessage":"should get start response but get {:?}","messagePattern":"should get start response but get (.+?)","errorType":"exception","errorClass":"SinkError::Internal","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/remote.rs","lineNumber":738,"sourceCode":"                    payload_schema,\n                })),\n            },\n            |rx| async move {\n                let rx = self.start_jvm_worker_thread(\n                    gen_class_name!(com.risingwave.connector.JniSinkWriterHandler),\n                    \"runJniSinkWriterThread\",\n                    rx,\n                );\n                Ok(ReceiverStream::new(rx).map_err(RpcError::from))\n            },\n        )\n        .await?;\n\n        match first_rsp {\n            SinkWriterStreamResponse {\n                response: Some(sink_writer_stream_response::Response::Start(_)),\n            } => Ok(handle),\n            msg => Err(SinkError::Internal(anyhow!(\n                \"should get start response but get {:?}\",\n                msg\n            ))),\n        }\n    }\n\n    async fn start_sink_coordinator_stream(\n        &self,\n        param: SinkParam,\n    ) -> Result<SinkCoordinatorStreamHandle> {\n        let (handle, first_rsp) = SinkCoordinatorStreamHandle::initialize(\n            SinkCoordinatorStreamRequest {\n                request: Some(sink_coordinator_stream_request::Request::Start(\n                    StartCoordinator {\n                        param: Some(param.to_proto()),\n                    },\n                )),\n            },","sourceCodeStart":720,"sourceCodeEnd":756,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/remote.rs#L720-L756","documentation":"`start_sink_writer_stream` establishes a bidirectional stream with a remote sink writer and waits for the first `SinkWriterStreamResponse::Start` message, which confirms the writer initialized and returns the writer handle. Any other first response yields this SinkError::Internal.","triggerScenarios":"The first message received on the sink writer stream is not a Start response — e.g. the service sent a ChangeRecord/Commit/barrier response first, closed the stream, or sent an error that surfaced as a different response variant.","commonSituations":"Mismatched protocol versions between RisingWave and the sink service; the remote writer failed to initialize and replied with a different variant; network/proxy injecting unexpected frames.","solutions":["Log the received `msg` (included in the error) to see which unexpected response arrived","Verify both ends run the same SinkWriterStreamResponse protobuf definition","Check the remote sink writer service startup/initialization code to ensure it sends Start first"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match start_sink_writer_stream(client, param).await {\n    Ok(handle) => handle,\n    Err(e) if e.to_string().contains(\"should get start response\") => {\n        log::error!(\"unexpected first response on sink writer stream: {}\", e);\n        return Err(e);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Pin matching versions of client and sink service","Ensure the remote writer sends Start before any other response","Log full response payloads on handshake failures"],"tags":["rust","risingwave","sink","grpc","protocol"],"backgroundTag":"unexpected-response-shape","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"}