Skip to content

Commit

Permalink
enh(core): log when deleting document qdrant points (#8296)
Browse files Browse the repository at this point in the history
Co-authored-by: Henry Fontanier <[email protected]>
  • Loading branch information
fontanierh and Henry Fontanier authored Oct 29, 2024
1 parent c13504b commit 732f11e
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions core/src/data_sources/data_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,7 @@ impl DataSource {
Ok(_) => {
info!(
data_source_internal_id = self.internal_id(),
document_id = document_id,
cluster = ?self.shadow_write_qdrant_cluster(),
collection = qdrant_client.collection_name(embedder_config),
"[SHADOW_WRITE_SUCCESS] Delete points"
Expand All @@ -1748,16 +1749,36 @@ impl DataSource {
error = %e,
"[SHADOW_WRITE_FAIL] Delete points"
);
return Err(e);
}
},
None => (),
}

qdrant_client
match qdrant_client
.delete_points(embedder_config, &self.internal_id, filter)
.await?;

Ok(())
.await
{
Ok(_) => {
info!(
data_source_internal_id = self.internal_id(),
document_id = document_id,
collection = qdrant_client.collection_name(embedder_config),
"[SUCCESS] Delete points"
);
Ok(())
}
Err(e) => {
error!(
data_source_internal_id = self.internal_id(),
document_id = document_id,
collection = qdrant_client.collection_name(embedder_config),
error = %e,
"[FAIL] Delete points"
);
Err(e)
}
}
}

pub async fn scrub_document_deleted_versions(
Expand Down

0 comments on commit 732f11e

Please sign in to comment.