Skip to content

Commit 1d16986

Browse files
committed
debugging: add extra logs to create chunk route
1 parent 5ee64d9 commit 1d16986

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

server/src/handlers/chunk_handler.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ pub async fn create_chunk(
348348
.json(json!({"message": "Must upgrade your plan to add more chunks"})));
349349
}
350350

351+
log::info!("Chunk count: {}", chunk_count);
351352
timer.add("get dataset count");
352353
}
353354

@@ -398,6 +399,8 @@ pub async fn create_chunk(
398399
.unwrap_or(vec![])
399400
.contains(&dataset_org_plan_sub.organization.organization.id);
400401

402+
timer.add("create chunk metadata");
403+
401404
if !non_upsert_chunk_metadatas.is_empty() {
402405
let prio_chunks_message: Vec<UploadIngestionMessage> = non_upsert_chunk_ingestion_message
403406
.ingestion_messages
@@ -541,6 +544,8 @@ pub async fn create_chunk(
541544
}
542545
}
543546

547+
timer.add("push to queue");
548+
544549
let response = match create_chunk_data.into_inner() {
545550
CreateChunkReqPayloadEnum::Single(_) => ReturnQueuedChunk::Single(Box::new(SingleQueuedChunkResponse {
546551
chunk_metadata: chunk_metadatas
@@ -555,6 +560,8 @@ pub async fn create_chunk(
555560
}),
556561
};
557562

563+
log::info!("Create Chunk timer: {:?}", timer.header_value());
564+
558565
Ok(HttpResponse::Ok()
559566
.insert_header((Timer::header_key(), timer.header_value()))
560567
.json(response))

0 commit comments

Comments
 (0)