-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] Implement compactor server interface #3375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Implement compactor server interface #3375
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@@ -0,0 +1,19 @@ | |||
syntax = "proto3"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe as future work it would be useful to add an endpoint to see the status for the currently compacting and last N compactions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e
/compaction/status
returns
id: <QUEUED | RUNNING | FAILED | SUCCEEDED> + Time
6adc66c
to
f04bbfa
Compare
_message: OneOffCompactionMessage, | ||
_ctx: &ComponentContext<CompactionManager>, | ||
) { | ||
tracing::info!("CompactionManager: Performing compaction"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should not synchronously perform compaction but instead queue the id for compaction in the next scheduled run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the next run all eligible compaction will be compacted, which always include any valid collection uuid that may be specified by the manual compaction interface
Will queue the one-off collection and compact during scheduled compaction
tracing::info!("CompactionManager: Performing compaction"); | ||
let mut ids = Vec::new(); | ||
self.compact_batch(&mut ids).await; | ||
self.hnsw_index_provider.purge_by_id(&ids).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is brittle and ideally we shouldn't have to rewrite this - suggest we queue up one offs instead of making them sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update this in the next PR on the stack. This is only a template impl
f04bbfa
to
ccf3eb3
Compare
2245609
to
b9521bc
Compare
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - N/A - New functionality - Following [the previous PR](#3375), this PR implements the logic to handle one-off compaction message in the compaction manager. It adds the collection ids to the scheduler, which will whitelist the collections for the next compaction run only. ## 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)?*
Description of changes
Summarize the changes made by this PR.
CompactionServer
struct in rust that implements this interface. It receives the request and send it to the runningCompactionManager
CompactionManager
.Test plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?