{"record":{"id":"bd7a736633584c59","repo":"risingwavelabs/risingwave","slug":"failed-to-refresh-table","errorCode":null,"errorMessage":"Failed to refresh table {}","messagePattern":"Failed to refresh table (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/stream/refresh_manager.rs","lineNumber":373,"sourceCode":"            .run_command(database_id, refresh_command)\n            .await;\n\n        match result {\n            Ok(_) => {\n                tracing::info!(table_id = %table_id, \"refresh command scheduled\");\n                Ok(())\n            }\n            Err(err) => {\n                tracing::error!(\n                    error = %err.as_report(),\n                    table_id = %table_id,\n                    \"failed to execute refresh command\"\n                );\n                self.metadata_manager\n                    .update_refresh_job_status(table_id, RefreshState::Idle, None, false)\n                    .await?;\n                self.remove_progress_tracker(table_id, \"failure\");\n                Err(anyhow!(err)\n                    .context(format!(\"Failed to refresh table {}\", table_id))\n                    .into())\n            }\n        }\n    }\n\n    async fn ensure_refreshable(\n        &self,\n        table_id: TableId,\n        associated_source_id: SourceId,\n    ) -> MetaResult<()> {\n        let table = self\n            .metadata_manager\n            .catalog_controller\n            .get_table_by_id(table_id)\n            .await?;\n\n        if !table.refreshable {","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/stream/refresh_manager.rs#L355-L391","documentation":"execute_refresh runs the refresh command for a table and, on failure, resets the job to Idle, clears its progress tracker, and returns the underlying err wrapped with context 'Failed to refresh table {}'. This is an error-aggregation site: the actual cause is the inner error (refresh command execution or status update failure).","triggerScenarios":"Any failure while executing a refresh: the refresh plan/command fails on the stream graph (e.g. upstream errors, actor failures), or update_refresh_job_status itself errors, during a scheduled or manual MV/table refresh.","commonSituations":"Compute node failure or OOM during refresh; upstream MV/source unavailable; serialization/plan errors on the refresh pipeline; meta-store write failures when resetting job status.","solutions":["Read the full error chain (the context wraps a root cause) to find the underlying failure; fix that first.","Check compute node health and logs for the failed refresh actors; restart unhealthy nodes.","Retry the refresh (manual or wait for the next scheduled run) — the job was reset to Idle so it can be re-executed.","If the root cause is a plan/query error, adjust the MV/table definition; if status updates fail, check meta store connectivity."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match execute_refresh(table_id).await {\n    Err(e) => {\n        // the outer context is 'Failed to refresh table {}'; inspect the root cause\n        let root = e.root_cause();\n        tracing::error!(?table_id, \"refresh failed: {root}\");\n        // retry transient failures; the job was reset to Idle\n        if is_transient(root) { schedule_retry(table_id); }\n    }\n    Ok(_) => {}\n}","preventionTips":["Always inspect the error chain, not just the outer context message.","Monitor compute node health and upstream MV/source availability before refresh windows.","Schedule refreshes off-peak to reduce OOM/timeout risk.","Keep meta store connections healthy so job status resets succeed."],"tags":["refresh","materialized-view","execution","meta"],"backgroundTag":"invalid-state-transition","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"}