forked from chroma-core/chroma
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Add memberlist for compaction service (chroma-core#1949)
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - ... - New functionality - This PR adds memberlist consumption for the compaction service and filter collections based on memberlist using Rendezvous assignment policy. ## Test plan *How are these changes tested?* - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust - [ ] Manual local integration testing with Tilt ## 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
16 changed files
with
443 additions
and
173 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
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
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,3 +1,17 @@ | ||
pub(crate) mod assignment_policy; | ||
pub(crate) mod config; | ||
mod rendezvous_hash; | ||
pub(crate) mod rendezvous_hash; | ||
|
||
use crate::{config::Configurable, errors::ChromaError}; | ||
|
||
use self::{assignment_policy::AssignmentPolicy, config::AssignmentPolicyConfig}; | ||
|
||
pub(crate) async fn from_config( | ||
config: &AssignmentPolicyConfig, | ||
) -> Result<Box<dyn AssignmentPolicy>, Box<dyn ChromaError>> { | ||
match &config { | ||
crate::assignment::config::AssignmentPolicyConfig::RendezvousHashing(_) => Ok(Box::new( | ||
assignment_policy::RendezvousHashingAssignmentPolicy::try_from_config(config).await?, | ||
)), | ||
} | ||
} |
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
Oops, something went wrong.