{"record":{"id":"bcca67b8e88f56fd","repo":"risingwavelabs/risingwave","slug":"dmlerror","errorCode":null,"errorMessage":"DmlError","messagePattern":"DmlError","errorType":"error_code","errorClass":"StreamExecutorError","httpStatus":null,"severity":"error","filePath":"src/stream/src/executor/error.rs","lineNumber":105,"sourceCode":"\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>),\n\n    #[error(\"Connector error: {0}\")]\n    ConnectorError(\n        #[source]\n        #[backtrace]\n        BoxedError,\n    ),\n\n    #[error(transparent)]\n    DmlError(\n        #[from]\n        #[backtrace]\n        DmlError,\n    ),\n\n    #[error(transparent)]\n    NotImplemented(#[from] NotImplemented),\n\n    #[error(transparent)]\n    Uncategorized(\n        #[from]\n        #[backtrace]\n        anyhow::Error,\n    ),\n}\n\n/// Serialize/deserialize error.","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/error.rs#L87-L123","documentation":"The DmlError variant transparently wraps risingwave_dml::error::DmlError, the error type for the DML service layer that buffers user writes (INSERT/UPDATE/DELETE) before they enter the streaming graph. It is thrown when the executor's interaction with the DML buffer fails.","triggerScenarios":"Raised via `?` where a DmlError is converted through the #[from] impl — e.g. when the DML channel to the source executor is broken, the table is being dropped/modified, or the write cannot be accepted.","commonSituations":"Client DML during a materialized-view/table schema change; the DML service channel closed while writes are in flight; frontend/back pressure causing buffer overflow or disconnect.","solutions":["Inspect the wrapped DmlError for the concrete cause.","Retry the DML statement — transient channel issues are resolved on actor recovery.","Check whether the target table/relation was dropped or altered concurrently.","Look at source executor logs around the failure epoch."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before writing, confirm the relation exists and accepts DML\nif frontend.table_exists(table_id) && !frontend.is_schema_changing(table_id) {\n    // safe to proceed with DML\n}","typeGuard":"fn is_dml_error(e: &StreamExecutorError) -> bool {\n    e.variant_name() == \"DmlError\"\n}","tryCatchPattern":"match write_result {\n    Err(e) if e.variant_name() == \"DmlError\" => {\n        // transient DML channel issue: retry the statement\n        retry_with_backoff(|| write_again()).await?;\n    }\n    other => other?,\n}","preventionTips":["Avoid concurrent DDL on tables receiving heavy DML.","Retry client DML on transient failures.","Monitor DML buffer/channel backpressure metrics.","Keep frontend and compute versions in sync."],"tags":["dml","write-path","stream-executor"],"backgroundTag":"database-write-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}