You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ENH]: Execute task with no backfill or incremental (#5867)
## Description of changes
_Summarize the changes made by this PR._
This change introduces an AttachedFunctionOrchestrator that does the following chain of operators
GetAttachedFunction -> GetCollectionAndSegments for output collection -> ExecuteAttachedFunction -> MaterializeLogs
It edits the RegisterOrchestrator to spawn a FinishAttachedTask operators that flushes compaction for the input + output collections and flushes updated function data.
The compact method in [compact.rs](http://compact.rs) has been edited to launch an `AttachedFunctionOrchestrator` in parallel on the results of the initial `LogFetchOrchestrator`. This orchestrator returns a chunk of MaterializedLog records that get applied via another instance of `ApplyLogOrchestrator`.
The above runs in parallel to the normal compaction workflow which simply runs an `ApplyLogsOrchestrator` on the results of the initial `LogFetchOrchestrator`.
The above two threads return a `CollectionRegisterInfo`. The function-related thread also returns a `FunctionContext`. The two threads are joined and each of these structures are passed onto the RegisterOrchestrator for completion.
`CompactionContext.collection_info` has been replaced by `CompactionContext.input_collection_info, CompactionContext.output_collection_info`
to reflect the fact that "compactions" can be pulling data from one collection and compacting to another. ApplyLogsOrchestrator always applies given logs to the collection specified by `CompactionContext.output_collection_info`
Hence, we take care to set this field to the appropriate collection before calling `run_apply_logs` in each thread.
- Improvements & Bug fixes
- ...
- New functionality
- ...
## Test plan
_How are these changes tested?_
- [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust
## Migration plan
_Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?_
## Observability plan
_What is the plan to instrument and monitor this change?_
## Documentation Changes
_Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the_ [_docs section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
0 commit comments