{"record":{"id":"c0916bf9b11b15a4","repo":"risingwavelabs/risingwave","slug":"unable-to-send-barrier","errorCode":null,"errorMessage":"unable to send barrier","messagePattern":"unable to send barrier","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/stream/src/common/log_store_impl/in_mem.rs","lineNumber":317,"sourceCode":"            .await\n            .map_err(|_| anyhow!(\"unable to send stream chunk\"))?;\n        Ok(())\n    }\n\n    async fn flush_current_epoch(\n        &mut self,\n        next_epoch: u64,\n        options: FlushCurrentEpochOptions,\n    ) -> LogStoreResult<LogWriterPostFlushCurrentEpoch<'_>> {\n        let is_checkpoint = options.is_checkpoint;\n        self.item_tx\n            .send(InMemLogStoreItem::Barrier {\n                next_epoch,\n                options,\n            })\n            .instrument_await(\"in_mem_send_item_barrier\")\n            .await\n            .map_err(|_| anyhow!(\"unable to send barrier\"))?;\n\n        let prev_epoch = self\n            .curr_epoch\n            .replace(next_epoch)\n            .expect(\"should have epoch\");\n\n        if is_checkpoint {\n            let truncated_epoch = self\n                .truncated_epoch_rx\n                .recv()\n                .instrument_await(\"in_mem_recv_truncated_epoch\")\n                .await\n                .ok_or_else(|| anyhow!(\"cannot get truncated epoch\"))?;\n            assert_eq!(truncated_epoch, prev_epoch);\n        }\n\n        Ok(LogWriterPostFlushCurrentEpoch::new(move || {\n            async move { Ok(()) }.boxed()","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/common/log_store_impl/in_mem.rs#L299-L335","documentation":"flush_current_epoch sends an InMemLogStoreItem::Barrier to the reader over the shared mpsc channel. This error means the send failed because the reader's receiver was dropped: the barrier cannot be acknowledged and the epoch cannot be checkpointed. Like the other in-mem log store send errors, it indicates the consuming side of the pair terminated unexpectedly.","triggerScenarios":"Calling `flush_current_epoch` when the paired reader has been dropped — the consumer actor exited, panicked, or was cancelled before the barrier was sent.","commonSituations":"Barrier completion failing during actor failure recovery; downstream executor crash mid-epoch; cancellation during pause/migration that dropped the reader while the writer flushed.","solutions":["Look for an earlier downstream executor failure in the logs; that is the root cause, this error is secondary.","Let the actor fail and rely on recovery rather than retrying the barrier send.","Verify writer/reader pairing: the reader must be owned by a live consuming task during flush.","Check the await-tree trace (`in_mem_send_item_barrier`) to see where the send blocked before failing."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = writer.flush_current_epoch(epoch, opts).await {\n    if e.to_string().contains(\"unable to send barrier\") {\n        // reader gone; treat epoch as not checkpointed and fail actor\n        fail_actor(e);\n    }\n    return Err(e);\n}","preventionTips":["Monitor downstream actor health before barrier flush.","Ensure barrier handling and reader consumption run in paired tasks.","Use await-tree traces to catch blocked barrier sends early."],"tags":["channel-closed","barrier","log-store","streaming"],"backgroundTag":"broken-pipe","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"}