Skip to content

Commit

Permalink
[CHORE] Do not log hnsw provider twice. (#3458)
Browse files Browse the repository at this point in the history
Do not log the buffer being read.  Instrument only once.
  • Loading branch information
rescrv authored Jan 9, 2025
1 parent 49b13f1 commit 0d01630
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rust/index/src/hnsw_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl HnswIndexProvider {
}
}

#[instrument]
#[instrument(skip(self, buf))]
async fn copy_bytes_to_local_file(
&self,
file_path: &Path,
Expand Down Expand Up @@ -344,8 +344,7 @@ impl HnswIndexProvider {
})
.await?;
let file_path = index_storage_path.join(file);
let bytes_read = buf.len();
self.copy_bytes_to_local_file(&file_path, buf).instrument(tracing::info_span!(parent: Span::current(), "hnsw provider copy bytes to local file", file = file, bytes = bytes_read)).await?;
self.copy_bytes_to_local_file(&file_path, buf).await?;
}
Ok(())
}
Expand Down

0 comments on commit 0d01630

Please sign in to comment.