diff --git a/crates/milli/src/update/new/indexer/write.rs b/crates/milli/src/update/new/indexer/write.rs index fc647cfa5..f910d2e7f 100644 --- a/crates/milli/src/update/new/indexer/write.rs +++ b/crates/milli/src/update/new/indexer/write.rs @@ -71,7 +71,19 @@ pub(super) fn write_to_db( &mut aligned_embedding, )?; } + write_from_bbqueue(&mut writer_receiver, index, wtxn, arroy_writers, &mut aligned_embedding)?; + + let direct_attempts = writer_receiver.sent_messages_attempts(); + let blocking_attempts = writer_receiver.blocking_sent_messages_attempts(); + let congestion_pct = (blocking_attempts as f64 / direct_attempts as f64) * 100.0; + tracing::debug!( + "Channel congestion metrics - \ + Direct send attempts: {direct_attempts}, \ + Blocking send attempts: {blocking_attempts} \ + ({congestion_pct:.1}% congestion)" + ); + Ok(()) }