From 82fe3358ca07c7ab3569d2f76dad9c5463c988a5 Mon Sep 17 00:00:00 2001 From: Dens Sumesh Date: Wed, 8 Jan 2025 11:38:08 -0800 Subject: [PATCH] cleanup: dedup by tracking id in the create chunk handler --- server/src/handlers/chunk_handler.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/handlers/chunk_handler.rs b/server/src/handlers/chunk_handler.rs index f6f244339..c32c119d0 100644 --- a/server/src/handlers/chunk_handler.rs +++ b/server/src/handlers/chunk_handler.rs @@ -379,6 +379,7 @@ pub async fn create_chunk( .clone() .into_iter() .chain(upsert_chunk_metadatas.clone().into_iter()) + .dedup_by(|x, y| x.tracking_id == y.tracking_id) .collect::>(); let mut redis_conn = redis_pool