{"record":{"id":"6e114e2e257d4da8","repo":"risingwavelabs/risingwave","slug":"batcherror","errorCode":null,"errorMessage":"BatchError","messagePattern":"BatchError","errorType":"exception","errorClass":"SchedulerError","httpStatus":null,"severity":"error","filePath":"src/frontend/src/scheduler/error.rs","lineNumber":51,"sourceCode":"        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]\n        BatchError,\n    ),\n\n    #[error(transparent)]\n    Connector(\n        #[from]\n        #[backtrace]\n        ConnectorError,\n    ),\n\n    #[error(transparent)]\n    Internal(\n        #[from]\n        #[backtrace]\n        anyhow::Error,","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/scheduler/error.rs#L33-L69","documentation":"SchedulerError::BatchError is a transparent wrapper (via #[from]) over risingwave_batch::error::BatchError, so the displayed message is the underlying batch engine error. It surfaces when batch executor construction or execution inside the compute engine fails and the error propagates up to the frontend scheduler.","triggerScenarios":"Building or executing a batch plan fails in the batch engine — e.g. an executor error during a distributed stage, invalid plan fragment, serialization of exec fields, or an internal batch assertion failure.","commonSituations":"Internal bugs in batch executors; incompatible plan fragments after version skew between frontend and compute nodes; task environment setup failures (e.g. missing tables after DDL races).","solutions":["Read the transparent BatchError chain and compute node logs for the root cause; the scheduler error itself is just a pass-through.","Retry the query if it followed a node restart or DDL race.","Ensure frontend and compute node versions match (no version skew in a rolling upgrade).","If reproducible with a specific query, minimize it and file a bug with the full error chain."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// unwrap the transparent cause before reporting\ncatch (e) { const cause = e.cause ?? e; log(cause); if (isTransient(cause)) retry(); else throw cause; }","preventionTips":["Keep frontend and compute node versions identical","Retry after DDL races or node restarts","Minimize reproducible queries and file a bug with the full error chain"],"tags":["frontend","scheduler","batch","transparent-error"],"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"}