-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH] Config to disable compactor on collections #3469
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] Config to disable compactor on collections #3469
Conversation
Please tag your PR title with one of: [ENH | BUG | DOC | TST | BLD | PERF | TYP | CLN | CHORE]. See https://docs.trychroma.com/contributing#contributing-code-and-ideas |
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
.disabled_collections | ||
.contains(&collection_info.collection_id) | ||
{ | ||
tracing::info!( |
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.
Can we bump to warning so that if we ever disable info we aren't in the dark?
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.
what is the tradeoff implementing the feature here vs. a flag in the sysdb? the sysdb approach feels a little cleaner to me and potentially more flexible
Say we have 1k collections, and there's a compaction bug affecting 1% of collections. To me it seems easier to bulk edit them in the sysdb rather than listing each one of the ten collections in a config somewhere.
@@ -8,4 +8,5 @@ pub(crate) struct CompactorConfig { | |||
pub(crate) min_compaction_size: usize, | |||
pub(crate) max_compaction_size: usize, | |||
pub(crate) max_partition_size: usize, | |||
pub(crate) disabled_collections: Vec<String>, |
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.
Option<Vec<String>>
for backwards compatibility/optional args.
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.
Looks good if it passes CI.
The goal is to make this as operationally easy as possible. If we add a column in the sysdb table then the oncall will have to set/unset it which seems operationally harder than setting an ENV that takes effect immediately. It will also mean that we build tooling around this which is also something that I am trying to avoid. |
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 somewhat agree with @codetheweb on this one that a change to the sysdb is better
- Move compactions to a Dead-letter-queue (DLQ) automatically
- Then "disabling compaction" becomes a manual DLQ move
We need 1 in general and 2 seems better to reuse the mechanism. I agree it needs some tooling though, but its a cleaner and more maintainable solution.
Maybe we add this, as we need it for oncall situations yesterday, and then we go add DLQ and deprecate this. Marking it as a HACK(1/11/2024) for now.
@codetheweb @sanketkedia wdyt?
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Can specify a list of collection ids that needs to disabled and compactor will respect that. - In runtime, can set the env `CHROMA_COMPACTION_SERVICE__COMPACTOR__DISABLED_COLLECTIONS=[list of collection ids]` or `CHROMA_COMPACTION_SERVICE.COMPACTOR.DISABLED_COLLECTIONS=[list of collection ids]` and the changes will take effect without restarting the pod ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes None
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Can specify a list of collection ids that needs to disabled and compactor will respect that. - In runtime, can set the env `CHROMA_COMPACTION_SERVICE__COMPACTOR__DISABLED_COLLECTIONS=[list of collection ids]` or `CHROMA_COMPACTION_SERVICE.COMPACTOR.DISABLED_COLLECTIONS=[list of collection ids]` and the changes will take effect without restarting the pod ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes None
This PR cherry-picks the commit a632f2b onto release/2025-01-10. If there are unresolved conflicts, please resolve them manually. Co-authored-by: Sanket Kedia <[email protected]>
Description of changes
Summarize the changes made by this PR.
CHROMA_COMPACTION_SERVICE__COMPACTOR__DISABLED_COLLECTIONS=[list of collection ids]
orCHROMA_COMPACTION_SERVICE.COMPACTOR.DISABLED_COLLECTIONS=[list of collection ids]
and the changes will take effect without restarting the podTest plan
How are these changes tested?
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
None