{"record":{"id":"a9974f47d427618a","repo":"risingwavelabs/risingwave","slug":"sink-error-sink-id-1-error-0","errorCode":null,"errorMessage":"Sink error: sink_id={1}, error: {0}","messagePattern":"Sink error: sink_id=(.+?), error: (.+?)","errorType":"error_code","errorClass":"StreamExecutorError","httpStatus":null,"severity":"critical","filePath":"src/stream/src/executor/error.rs","lineNumber":70,"sourceCode":"        ArrayError,\n    ),\n\n    #[error(\"Chunk operation error: {0}\")]\n    ExprError(\n        #[from]\n        #[backtrace]\n        ExprError,\n    ),\n\n    // TODO: remove this after state table is fully used\n    #[error(\"Serialize/deserialize error: {0}\")]\n    SerdeError(\n        #[source]\n        #[backtrace]\n        BoxedError,\n    ),\n\n    #[error(\"Sink error: sink_id={1}, error: {0}\")]\n    SinkError(\n        #[source]\n        #[backtrace]\n        SinkError,\n        SinkId,\n    ),\n\n    #[error(transparent)]\n    RpcError(\n        #[from]\n        #[backtrace]\n        RpcError,\n    ),\n\n    #[error(\"Channel closed: {0}\")]\n    ChannelClosed(String),\n\n    #[error(transparent)]","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/error.rs#L52-L88","documentation":"`ErrorKind::SinkError` wraps a `SinkError` plus the `SinkId` of the failing sink, displayed as \"Sink error: sink_id={1}, error: {0}\". When a sink executor's write to the external sink (e.g., Kafka, JDBC, Redis) fails, the sink-specific error is converted into this variant so the log identifies exactly which sink failed.","triggerScenarios":"Any failure while a sink executor delivers rows to the external system — Kafka produce failures (broker down, auth, message too large), JDBC constraint violations, Redis connection errors — raised by the sink connector and wrapped as StreamExecutorError::SinkError with the sink's ID.","commonSituations":"External broker unavailable or credentials rotated; sink payload exceeding the broker's max message size; schema changes on the target system (new NOT NULL columns, topic deleted); network partition between RisingWave and the sink.","solutions":["Note the sink_id from the error and query `rw_catalog.rw_sinks` to identify the sink and its target.","Check the external system's health, credentials, and connectivity (broker reachable, topic exists, ACLs allow writes).","Fix data-level issues: oversize messages, schema mismatches, or constraint violations at the target.","After fixing the external system, the stream actor will retry; if the sink is in a permanently failed state, recreate or resume the sink."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-flight sink checks before creating it:\n// - broker reachable: kafka-console-producer / redis-cli ping\n// - target topic/table exists and credentials valid\n// - message size within broker limits (e.g. Kafka max.request.size)","typeGuard":null,"tryCatchPattern":"// RisingWave retries sink writes with backoff; operators should alert on\n// 'Sink error: sink_id=' logs, identify the sink via\n// SELECT * FROM rw_catalog.rw_sinks WHERE sink_id = '<id>';\n// then fix the external system — actors resume automatically once healthy.","preventionTips":["Validate sink connectivity and credentials before CREATE SINK.","Keep payloads under the broker's max message size (compress if needed).","Sync target schema changes with the sink definition.","Monitor sink lag and error metrics in rw_catalog / Grafana."],"tags":["sink","streaming","connector","network","kafka"],"backgroundTag":"upstream-api-error","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"}