Skip to content

[ENH] Make roll dirty log always converge to coalesce everything. #4927

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

Merged
merged 12 commits into from
Jun 25, 2025
Merged
29 changes: 28 additions & 1 deletion chromadb/test/property/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@

collection_st = st.shared(strategies.collections(with_hnsw_params=True), key="coll")

@given(
collection=collection_st,
record_set=strategies.recordsets(collection_st, min_size=1, max_size=5),
)
@settings(
deadline=None,
parent=override_hypothesis_profile(
normal=hypothesis.settings(max_examples=500),
fast=hypothesis.settings(max_examples=200),
),
max_examples=2
)
def test_add_miniscule(
client: ClientAPI,
collection: strategies.Collection,
record_set: strategies.RecordSet,
) -> None:
if (
client.get_settings().chroma_api_impl
== "chromadb.api.async_fastapi.AsyncFastAPI"
):
pytest.skip(
"TODO @jai, come back and debug why CI runners fail with async + sync"
)
_test_add(client, collection, record_set, True, always_compact=True)


# Hypothesis tends to generate smaller values so we explicitly segregate the
# the tests into tiers, Small, Medium. Hypothesis struggles to generate large
Expand Down Expand Up @@ -104,6 +130,7 @@ def _test_add(
record_set: strategies.RecordSet,
should_compact: bool,
batch_ann_accuracy: bool = False,
always_compact: bool = False,
) -> None:
create_isolated_database(client)

Expand Down Expand Up @@ -132,7 +159,7 @@ def _test_add(
if (
not NOT_CLUSTER_ONLY
and should_compact
and len(normalized_record_set["ids"]) > 10
and (len(normalized_record_set["ids"]) > 10 or always_compact)
):
# Wait for the model to be updated
wait_for_version_increase(client, collection.name, initial_version)
Expand Down
2 changes: 1 addition & 1 deletion rust/log-service/src/bin/chroma-inspect-dirty-log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() {
.connect()
.await
.expect("could not connect to log service");
let mut client = LogServiceClient::new(logservice);
let mut client = LogServiceClient::new(logservice).max_decoding_message_size(256 << 20);
let dirty = client
.inspect_dirty_log(InspectDirtyLogRequest {})
.await
Expand Down
Loading
Loading