diff --git a/sgl-model-gateway/src/policies/tree.rs b/sgl-model-gateway/src/policies/tree.rs index 2fe544b35..99ee75540 100644 --- a/sgl-model-gateway/src/policies/tree.rs +++ b/sgl-model-gateway/src/policies/tree.rs @@ -398,12 +398,17 @@ impl Tree { // Attach tenant to the new split node (intermediate - no timestamp update) // The cloned DashMap already has the tenant; just ensure char count is correct - if !new_node.tenant_last_access_time.contains_key(tenant_id.as_ref()) { + if !new_node + .tenant_last_access_time + .contains_key(tenant_id.as_ref()) + { self.tenant_char_count .entry(Arc::clone(&tenant_id)) .and_modify(|count| *count += matched_text_count) .or_insert(matched_text_count); - new_node.tenant_last_access_time.insert(Arc::clone(&tenant_id), 0); + new_node + .tenant_last_access_time + .insert(Arc::clone(&tenant_id), 0); } InsertStep::Continue { @@ -415,12 +420,17 @@ impl Tree { drop(matched_node_text); // Ensure tenant exists at this intermediate node - if !matched_node.tenant_last_access_time.contains_key(tenant_id.as_ref()) { + if !matched_node + .tenant_last_access_time + .contains_key(tenant_id.as_ref()) + { self.tenant_char_count .entry(Arc::clone(&tenant_id)) .and_modify(|count| *count += matched_node_text_count) .or_insert(matched_node_text_count); - matched_node.tenant_last_access_time.insert(Arc::clone(&tenant_id), 0); + matched_node + .tenant_last_access_time + .insert(Arc::clone(&tenant_id), 0); } InsertStep::Continue { @@ -447,7 +457,8 @@ impl Tree { // Loop exited normally (remaining empty) - prev is the leaf node // Update its timestamp for LRU ordering let epoch = get_epoch(); - prev.tenant_last_access_time.insert(Arc::clone(&tenant_id), epoch); + prev.tenant_last_access_time + .insert(Arc::clone(&tenant_id), epoch); } /// Performs prefix matching and returns detailed result with char counts. diff --git a/sgl-model-gateway/src/routers/grpc/regular/stages/classify/response_processing.rs b/sgl-model-gateway/src/routers/grpc/regular/stages/classify/response_processing.rs index 9044f102a..6cc6b2de7 100644 --- a/sgl-model-gateway/src/routers/grpc/regular/stages/classify/response_processing.rs +++ b/sgl-model-gateway/src/routers/grpc/regular/stages/classify/response_processing.rs @@ -198,7 +198,7 @@ impl PipelineStage for ClassifyResponseProcessingStage { // Build response let response = ClassifyResponse::new( - format!("classify-{}", dispatch.request_id), + dispatch.request_id.clone(), dispatch.model.clone(), dispatch.created, vec![classify_data],