affaan-m/ECC · error · anyhow::Error
DB writer acknowledgement dropped
Error message
DB writer acknowledgement dropped
What it means
A DB write message was enqueued and awaited, but the writer task dropped the oneshot acknowledgement sender before replying — i.e. the writer stopped while processing this request. Whether the write landed is unknown; treat the DB writer as failed.
Source
Thrown at ecc2/src/session/runtime.rs:76
}
async fn touch_heartbeat(&self) -> Result<()> {
self.send(|ack| DbMessage::TouchHeartbeat { ack }).await
}
async fn send<F>(&self, build: F) -> Result<()>
where
F: FnOnce(oneshot::Sender<DbAck>) -> DbMessage,
{
let (ack_tx, ack_rx) = oneshot::channel();
self.tx
.send(build(ack_tx))
.map_err(|_| anyhow::anyhow!("DB writer channel closed"))?;
match ack_rx.await {
Ok(Ok(())) => Ok(()),
Ok(Err(error)) => Err(anyhow::anyhow!(error)),
Err(_) => Err(anyhow::anyhow!("DB writer acknowledgement dropped")),
}
}
}
fn run_db_writer(db_path: PathBuf, session_id: String, mut rx: mpsc::UnboundedReceiver<DbMessage>) {
let (opened, open_error) = match StateStore::open(&db_path) {
Ok(db) => (Some(db), None),
Err(error) => (None, Some(error.to_string())),
};
while let Some(message) = rx.blocking_recv() {
match message {
DbMessage::UpdateState { state, ack } => {
let result = match opened.as_ref() {
Some(db) => db
.update_state(&session_id, &state)
.map_err(|error| error.to_string()),
None => Err(open_errorView on GitHub (pinned to 06c5e118c4)
Solutions
- Check whether the writer task panicked or was cancelled before acknowledging.
- Add logging around writer shutdown to find the drop cause.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at ecc2/src/session/runtime.rs:76 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/7e3b09c68c633b99.
Report an issue: GitHub.