-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Rust write segments and flush S3 operator skeleton (#2009)
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - This PR adds skeleton code for write segments and flush S3 operator to prepare for integration with Blockfile. - New functionality - ... ## Test plan *How are these changes tested?* - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?*
- Loading branch information
Showing
4 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use crate::execution::operator::Operator; | ||
use async_trait::async_trait; | ||
|
||
#[derive(Debug)] | ||
pub struct FlushS3Operator {} | ||
|
||
#[derive(Debug)] | ||
pub struct FlushS3Input {} | ||
|
||
#[derive(Debug)] | ||
pub struct FlushS3Output {} | ||
|
||
pub type WriteSegmentsResult = Result<FlushS3Output, ()>; | ||
|
||
#[async_trait] | ||
impl Operator<FlushS3Input, FlushS3Output> for FlushS3Operator { | ||
type Error = (); | ||
|
||
async fn run(&self, input: &FlushS3Input) -> WriteSegmentsResult { | ||
Ok(FlushS3Output {}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
pub(super) mod brute_force_knn; | ||
pub(super) mod flush_s3; | ||
pub(super) mod flush_sysdb; | ||
pub(super) mod normalize_vectors; | ||
pub(super) mod partition; | ||
pub(super) mod pull_log; | ||
pub(super) mod write_segments; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use crate::execution::operator::Operator; | ||
use async_trait::async_trait; | ||
|
||
#[derive(Debug)] | ||
pub struct WriteSegmentsOperator {} | ||
|
||
#[derive(Debug)] | ||
pub struct WriteSegmentsInput {} | ||
|
||
#[derive(Debug)] | ||
pub struct WriteSegmentsOutput {} | ||
|
||
pub type WriteSegmentsResult = Result<WriteSegmentsOutput, ()>; | ||
|
||
#[async_trait] | ||
impl Operator<WriteSegmentsInput, WriteSegmentsOutput> for WriteSegmentsOperator { | ||
type Error = (); | ||
|
||
async fn run(&self, input: &WriteSegmentsInput) -> WriteSegmentsResult { | ||
Ok(WriteSegmentsOutput {}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters