Skip to content

Commit

Permalink
producer: append error should also print stream name and shard id (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
alissa-tung committed Sep 30, 2022
1 parent 610e060 commit 8690b47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hstreamdb/src/producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ async fn flush(
.map_err(|err| format!("producer connect error: url = {shard_url}, {err}"))?;
let append_result = append(
channel,
stream_name,
stream_name.clone(),
shard_id,
compression_type,
buffer.to_vec(),
Expand All @@ -376,7 +376,9 @@ async fn flush(
})
}
}
Err(format!("producer append error: url = {shard_url}, {err}"))
Err(format!(
"producer append error: url = {shard_url}, stream = {stream_name}, shard_id = {shard_id}, {err}"
))
}
Ok(append_result) => {
log::debug!("append succeed: len = {}", append_result.len());
Expand Down

0 comments on commit 8690b47

Please sign in to comment.