Skip to content

Commit

Permalink
fix(rust): Fix incorrect logging output (#5920)
Browse files Browse the repository at this point in the history
the `finish()` function returns whether the write happened, as such the
logs were messed up.

Fix #5847
  • Loading branch information
untitaker committed May 15, 2024
1 parent 49fb7c0 commit b7e0867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust_snuba/src/strategies/clickhouse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ impl TaskRunner<BytesInsertBatch<HttpBatch>, BytesInsertBatch<()>, anyhow::Error
let write_start = SystemTime::now();

tracing::debug!("performing write");
let skip_write = http_batch.finish().await.map_err(RunTaskError::Other)?;
let did_write = http_batch.finish().await.map_err(RunTaskError::Other)?;

if !skip_write {
if did_write {
tracing::info!("Inserted {} rows", num_rows);
}

Expand Down

0 comments on commit b7e0867

Please sign in to comment.