Skip to content

Commit

Permalink
[BUG]: gracefully handle compaction orchestrator errors (#2940)
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb authored Oct 11, 2024
1 parent 01a8893 commit 4693b0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rust/worker/src/execution/orchestration/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ impl ChromaError for GetSegmentWritersError {
enum CompactionError {
#[error(transparent)]
SystemTimeError(#[from] std::time::SystemTimeError),
#[error("Result channel dropped")]
ResultChannelDropped,
}

impl ChromaError for CompactionError {
Expand Down Expand Up @@ -519,7 +521,8 @@ impl CompactOrchestrator {
let mut handle = self.system.clone().start_component(self);
let result = rx.await;
handle.stop();
result.unwrap()
result
.map_err(|_| Box::new(CompactionError::ResultChannelDropped) as Box<dyn ChromaError>)?
}
}

Expand Down

0 comments on commit 4693b0f

Please sign in to comment.