{"record":{"id":"60eb3a9fecdba1a3","repo":"risingwavelabs/risingwave","slug":"rpcerror-60eb3a","errorCode":null,"errorMessage":"RpcError","messagePattern":"RpcError","errorType":"error_code","errorClass":"StreamExecutorError","httpStatus":null,"severity":"error","filePath":"src/stream/src/executor/error.rs","lineNumber":78,"sourceCode":"    ),\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)]\n    ExchangeChannelClosed(\n        #[from]\n        #[backtrace]\n        ExchangeChannelClosed,\n    ),\n\n    #[error(\"Failed to align barrier: expected `{0:?}` but got `{1:?}`\")]\n    AlignBarrier(Box<Barrier>, Box<Barrier>),","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/error.rs#L60-L96","documentation":"This is the RpcError variant of StreamExecutorError, which transparently wraps an RpcError from risingwave_rpc_client. Stream executors throw it when a gRPC call to another service (meta, compute, or another worker) fails. Since the variant uses #[error(transparent)] and #[from], the underlying RPC error's Display and source are passed through unchanged.","triggerScenarios":"Any executor path that performs an RPC via risingwave_rpc_client and uses `?` on a Result whose error is RpcError, e.g. remote sink/table lookups or meta node communication during streaming. The `#[from]` impl converts the RpcError automatically.","commonSituations":"Meta node down or unreachable; network partitions between compute nodes; RPC deadlines exceeded under load; service restarting during deployment.","solutions":["Check connectivity between the compute node and the meta service (address, port, DNS).","Inspect the wrapped RpcError source (via its `source()`) for the concrete gRPC status (Unavailable, DeadlineExceeded, etc.).","Retry the operation if the failure was transient; the stream framework typically restarts the actor.","Verify service versions are compatible (proto mismatch can cause RPC failures)."],"exampleFix":"// before\nlet resp = rpc_client.do_something().await?; // RpcError propagates as executor error\n// after\nlet resp = rpc_client.do_something().await.inspect_err(|e| {\n    tracing::warn!(error = ?e, \"rpc failed, will be retried by actor restart\");\n})?;","handlingStrategy":"retry","validationCode":"// before issuing RPC: verify endpoint reachable\nasync fn ensure_rpc_ready(addr: &str) -> anyhow::Result<()> {\n    tokio::net::TcpStream::connect(addr).await\n        .map_err(|e| anyhow::anyhow!(\"rpc endpoint {addr} unreachable: {e}\"))?;\n    Ok(())\n}","typeGuard":"fn as_rpc_error(e: &StreamExecutorError) -> Option<&risingwave_rpc_client::error::RpcError> {\n    use risingwave_rpc_client::error::RpcError;\n    e.0.downcast_ref::<RpcError>()\n}","tryCatchPattern":"match result {\n    Err(e) if matches!(e.variant_name(), \"RpcError\") => {\n        // inspect inner RpcError, apply backoff and retry\n    }\n    other => other.map(|_| ())?,\n}","preventionTips":["Monitor meta/worker connectivity and health checks continuously.","Set sane RPC timeouts and retries with exponential backoff in clients.","Keep cluster versions in sync to avoid proto incompatibilities.","Alert on gRPC status codes like Unavailable and DeadlineExceeded early."],"tags":["rpc","network","grpc","stream-executor"],"backgroundTag":"network-request-failed","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"}