Skip to content

[ENH] State machine based property tests for GC.#4057

Merged
rohitcpbot merged 14 commits intomainfrom
rcp/GC-PropTest-Review
Mar 25, 2025
Merged

[ENH] State machine based property tests for GC.#4057
rohitcpbot merged 14 commits intomainfrom
rcp/GC-PropTest-Review

Conversation

@rohitcpbot
Copy link
Contributor

Description of changes

State machine based property tests for Garbage Collection.
Does not depend on the entire cluster to be up using Tilt.
Uses sparse index based abstractions to add new versions
to the collection.
This is a replacement for the prop tests in
#3883
That PR will be closed in favor of this.

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • Adds property tests that are not dependent on Tilt.
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

@github-actions
Copy link

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)

sea-query-binder = { workspace = true, features = ["sqlx-sqlite"] }
chrono = { workspace = true }
prost = { workspace = true }
derivative = "2.2.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

derivative allows to skip Debug implementation for storage.
If this does not feel correct, i can remove this and use an alternate approach.

Properties checked -
a) versions after cutoff are deleted
b) versions before cutoff are preserved
c) versions in version file are ordered
d) min versions are retained
Includes changes to TestSysDb.
Adding version_file_name to proto.
Removing the Tilt based integration test as a prop test.
Removing prop test in the operator.
Removing a field that is not needed.
Segment info was not copied properly resulting
in prop test failures.
Remove them from various places that were setup
for debugging. Converted few to tracing::debug
for future debugging.
@rohitcpbot rohitcpbot force-pushed the rcp/GC-PropTest-Review branch from fefb6a2 to 47a783e Compare March 25, 2025 13:28
@rohitcpbot rohitcpbot merged commit ad2288c into main Mar 25, 2025
95 checks passed
@rohitcpbot rohitcpbot deleted the rcp/GC-PropTest-Review branch March 25, 2025 20:03
Inventrohyder pushed a commit to Inventrohyder/chroma that referenced this pull request Aug 5, 2025
## Description of changes

State machine based property tests for Garbage Collection.
Does not depend on the entire cluster to be up using Tilt.
Uses sparse index based abstractions to add new versions
to the collection.
This is a replacement for the prop tests in 
chroma-core#3883
That PR will be closed in favor of this.

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
   - Adds property tests that are not dependent on Tilt.
 - New functionality
   - ...

## Test plan
*How are these changes tested?*

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
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