{"record":{"id":"10fe6328d5b11c33","repo":"risingwavelabs/risingwave","slug":"end-of-barrier-receiver","errorCode":null,"errorMessage":"end of barrier receiver","messagePattern":"end of barrier receiver","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/stream/src/executor/backfill/snapshot_backfill/utils.rs","lineNumber":26,"sourceCode":"//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse anyhow::anyhow;\nuse tokio::sync::mpsc::UnboundedReceiver;\n\nuse crate::executor::{Barrier, StreamExecutorResult};\n\npub(super) async fn receive_next_barrier(\n    barrier_rx: &mut UnboundedReceiver<Barrier>,\n) -> StreamExecutorResult<Barrier> {\n    Ok(barrier_rx\n        .recv()\n        .await\n        .ok_or_else(|| anyhow!(\"end of barrier receiver\"))?)\n}\n","sourceCodeStart":8,"sourceCodeEnd":28,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/backfill/snapshot_backfill/utils.rs#L8-L28","documentation":"The unbounded barrier receiver returned None, meaning the barrier channel sender was dropped. The barrier stream is the executor's heartbeat and control plane, so a closed channel means the actor's barrier input is gone and the executor cannot continue.","triggerScenarios":"All `Barrier` senders dropped while `receive_next_barrier` polls — typically the actor handle/multi-channel honoree (actor context) is dropped during shutdown, failure, or cancellation.","commonSituations":"Cluster shutdown or actor failure mid-stream; meta node terminating the actor; bugs in barrier channel lifecycle during actor reschedule.","solutions":["Look at meta/actor logs preceding the error to find why the barrier sender was dropped (actor failure, cancel, shutdown).","Ensure the barrier channel is kept alive for the executor's full lifetime after rebuild on reschedule.","If it happens without any shutdown/failure, capture a trace and file an issue."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"let barrier = receive_next_barrier(&mut barrier_rx).await.inspect_err(|_| warn!(\"barrier channel closed; actor cannot continue\"))?;","preventionTips":["Keep barrier senders alive for the full executor lifetime","Gracefully stop executors before dropping actor contexts","Alert on barrier channel closes during rescheduling"],"tags":["streaming","barrier","channel-closed"],"backgroundTag":"unexpected-response-shape","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"}