Skip to content

Commit

Permalink
Make count backward compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Sicheng Pan authored and Sicheng-Pan committed Dec 17, 2024
1 parent 1b9464e commit a3cf8dd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions rust/worker/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use chroma_types::{
self, query_executor_server::QueryExecutor, CountPlan, CountResult, GetPlan, GetResult,
KnnBatchResult, KnnPlan,
},
CollectionUuid, Segment, SegmentUuid,
CollectionUuid, SegmentUuid,
};
use futures::{stream, StreamExt, TryStreamExt};
use tokio::signal::unix::{signal, SignalKind};
Expand Down Expand Up @@ -191,12 +191,7 @@ impl WorkerServer {

let count_orchestrator = CountQueryOrchestrator::new(
self.clone_system()?,
&Segment::try_from(
scan.metadata
.ok_or(Status::invalid_argument("Invalid metadata segment"))?,
)?
.id
.0,
&SegmentUuid::from_str(&scan.metadata.map(|seg| seg.id).unwrap_or(scan.metadata_id))?.0,
&CollectionUuid::from_str(&collection.id)
.map_err(|e| Status::invalid_argument(e.to_string()))?,
self.log.clone(),
Expand Down

0 comments on commit a3cf8dd

Please sign in to comment.