{"record":{"id":"ee7abf1fd82024e1","repo":"risingwavelabs/risingwave","slug":"0-ee7abf","errorCode":null,"errorMessage":"{0}","messagePattern":"\\{0\\}","errorType":"exception","errorClass":"SchedulerError","httpStatus":null,"severity":"error","filePath":"src/frontend/src/scheduler/error.rs","lineNumber":36,"sourceCode":"use risingwave_rpc_client::error::RpcError;\nuse thiserror::Error;\n\nuse crate::error::{ErrorCode, RwError};\nuse crate::scheduler::plan_fragmenter::QueryId;\n\n#[derive(Error, Debug)]\npub enum SchedulerError {\n    #[error(\"Pin snapshot error: {0} fails to get epoch {1}\")]\n    PinSnapshot(QueryId, u64),\n\n    #[error(transparent)]\n    RpcError(\n        #[from]\n        #[backtrace]\n        RpcError,\n    ),\n\n    #[error(\"{0}\")]\n    TaskExecutionError(String),\n\n    #[error(\"Task got killed because compute node running out of memory\")]\n    TaskRunningOutOfMemory,\n\n    /// Used when receive cancel request for some reason, such as user cancel or timeout.\n    #[error(\"Query cancelled: {0}\")]\n    QueryCancelled(String),\n\n    #[error(\n        \"Reject query: the {0} query number reaches the limit: {1}. Use `SHOW PROCESSLIST` to check for hanging queries and cancel them if needed.\"\n    )]\n    QueryReachLimit(QueryMode, u64),\n\n    #[error(transparent)]\n    BatchError(\n        #[from]\n        #[backtrace]","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/scheduler/error.rs#L18-L54","documentation":"SchedulerError::TaskExecutionError(String) carries a free-form message describing a failure of a batch execution task running on a compute node and reported back to the frontend scheduler. The text is produced by the failing stage/task (e.g. a shard-level execution error) and forwarded verbatim.","triggerScenarios":"A distributed batch execution stage reports failure to the frontend — e.g. an internal execution error on a compute node, a task RPC response carrying an error status, or task setup/teardown failures.","commonSituations":"Compute node errors during parallel scan/aggregation; a stage dying after a node restart; expression evaluation errors surfaced from the execution engine.","solutions":["Read the compute node logs around the failing query's task id for the root cause; the frontend message is only a relay.","Retry the query if a node restarted transiently.","If the root cause is a data/expression error, fix the query (e.g. casting, division by zero) accordingly.","Ensure compute nodes have adequate resources (memory/disk) to run the stage."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// surface full message + check compute logs\ncatch (e) { log(e.message); fetchComputeNodeLogs(queryId); throw e; }","preventionTips":["Read compute node logs for the root cause behind the relayed message","Retry after node restarts","Fix query-level issues (casts, division by zero) the execution engine reports"],"tags":["frontend","scheduler","batch","task-execution"],"backgroundTag":"sql-query-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"}