Skip to content

[TST](garbage_collector): add MCMR hard delete test - #6947

Merged
rescrv merged 8 commits into
mainfrom
rescrv/test-add-gc
Apr 28, 2026
Merged

[TST](garbage_collector): add MCMR hard delete test#6947
rescrv merged 8 commits into
mainfrom
rescrv/test-add-gc

Conversation

@rescrv

@rescrv rescrv commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Description of changes

Verify the garbage collector hard-deletes a collection that spans two
regions. The test writes records in alternating rounds across both
clients, waits for compaction, deletes the collection, then tails the
GC pod logs via kubectl to confirm a "Hard deleting collections" entry
appears for the deleted collection UUID within a timeout.

Test plan

Is a test. CI.

Migration plan

N/A

Observability plan

N/A

Documentation Changes

N/A

Co-authored-by: AI

@github-actions

Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot

propel-code-bot Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Add MCMR GC hard-delete integration test with MinIO and GC log verification

This PR primarily adds a new multi-region property/integration-style test in chromadb/test/property/test_add_gc.py that validates garbage collection hard-delete behavior for a collection spanning two regions. The test alternates writes across two MCMR clients, waits for collection version increases (as a proxy for propagation/compaction progress), deletes the collection, tails garbage-collector pod logs via kubectl, and asserts a matching "Hard deleting collections" log entry for the target collection UUID.

It also updates CI/infra wiring to run this test in the cluster workflow and avoid accidental execution in incompatible jobs. Supporting changes include adding MinIO console port-forwarding in .github/actions/tilt/action.yaml, adding test_add_gc.py to cluster test matrices in .github/workflows/_python-tests.yml, excluding it from non-cluster property shards, and introducing a skip_single_region marker handling path in chromadb/test/conftest.py so tests can explicitly suppress classic single-region parametrization when multi-region mode is enabled.

This summary was automatically generated by @propel-code-bot

@propel-code-bot propel-code-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues were found; the PR appears robust and well-structured for validating multi-region hard delete behavior.

Status: No Issues Found | Risk: Low

Review Details

📁 33 files reviewed | 💬 0 comments

@rescrv
rescrv force-pushed the rescrv/test-add-gc branch from 4638e11 to c7fce65 Compare April 22, 2026 00:14
@blacksmith-sh

This comment has been minimized.

Comment thread chromadb/test/property/test_add_gc.py Outdated
current_version2 = cast(int, coll2.get_model()["version"])

for round_index in range(COMPACTION_ROUNDS):
writer_client = client1 if round_index % 2 == 0 else client2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can keep a vector/list of indexes and index into them to keep it compact

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread chromadb/test/property/test_add_gc.py Outdated

for round_index in range(COMPACTION_ROUNDS):
writer_client = client1 if round_index % 2 == 0 else client2
writer_collection = coll1 if round_index % 2 == 0 else coll2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@rescrv
rescrv force-pushed the rescrv/test-add-gc branch from c7fce65 to 02c0e37 Compare April 22, 2026 16:17
@rescrv
rescrv force-pushed the rescrv/test-add-gc branch 2 times, most recently from 7a824a5 to e86e5e9 Compare April 23, 2026 16:15
Base automatically changed from rescrv/gc-mcmr to main April 27, 2026 16:26
@rescrv
rescrv force-pushed the rescrv/test-add-gc branch from f4f0cd8 to a2eb1f1 Compare April 27, 2026 16:51
@blacksmith-sh

This comment has been minimized.

rescrv added 4 commits April 27, 2026 16:25
Verify the garbage collector hard-deletes a collection that spans two
regions.  The test writes records in alternating rounds across both
clients, waits for compaction, deletes the collection, then tails the
GC pod logs via kubectl to confirm a "Hard deleting collections" entry
appears for the deleted collection UUID within a timeout.

Co-authored-by: AI
@rescrv
rescrv force-pushed the rescrv/test-add-gc branch from f24e8fa to 161cb1e Compare April 27, 2026 23:26
@blacksmith-sh

This comment has been minimized.

@blacksmith-sh

blacksmith-sh Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_add_gc_hard_deletes_mcmr_collection View Logs

Fix in Cursor

@rescrv
rescrv merged commit 3adb4e9 into main Apr 28, 2026
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants