Commit fa6f167
authored
[ENH]: Modified AttachFunction to do 2PC on a new is_ready column (#5872)
## Description of changes
_Summarize the changes made by this PR._
This change adds an `is_ready: bool` column to the Attachedfunctions table to facilitate a 2-phase commit on creation.
AttachFunction now operates in three phases after this change:
1) Creates a row in the attached_functions table with `is_ready = false`.
2) Calls backfill (a stub for now).
3) Creates the output collection for this function and sets `is_ready` to true.
Getters for the attached_function model in go have been adjusted to filter by `is_ready=true`. There are two added getters called `GetAnyById`and `GetAnyByName`to get rows that can also have `is_ready` set to false.
- Improvements & Bug fixes
- ...
- New functionality
- ...
## Test plan
_How are these changes tested?_
`test_task_api.py` has been re-enabled
- [ ] 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)?_1 parent 2af0a46 commit fa6f167
File tree
17 files changed
+646
-530
lines changed- .github/workflows
- chromadb/test/distributed
- go/pkg/sysdb
- coordinator
- grpc
- metastore/db
- dao
- dbmodel
- mocks
- migrations
- idl/chromadb/proto
- rust
- frontend/src/impls
- sysdb/src
- types/src
17 files changed
+646
-530
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
0 commit comments