Skip to content

Commit fa6f167

Browse files
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

17 files changed

+646
-530
lines changed

.github/workflows/_python-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ jobs:
141141
- "chromadb/test/distributed/test_sanity.py"
142142
- "chromadb/test/distributed/test_log_backpressure.py"
143143
- "chromadb/test/distributed/test_repair_collection_log_offset.py"
144+
- "chromadb/test/distributed/test_task_api.py"
144145
include:
145146
- test-glob: "chromadb/test/property/test_add.py"
146147
parallelized: false

0 commit comments

Comments
 (0)