Skip to content

Commit

Permalink
fix(rust): Fix incorrect logging output
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 f4ed29a commit 0021c12
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 0021c12

Please sign in to comment.