Skip to content

fix(sysdb): serialize collection deletion with writes - #7643

Open
mikemikimike wants to merge 2 commits into
chroma-core:mainfrom
mikemikimike:codex/fix-7375-collection-race
Open

fix(sysdb): serialize collection deletion with writes#7643
mikemikimike wants to merge 2 commits into
chroma-core:mainfrom
mikemikimike:codex/fix-7375-collection-race

Conversation

@mikemikimike

Copy link
Copy Markdown

Summary

delete_collection used a deferred SQLite transaction while create_collection already acquired the write lock immediately. Under concurrent create/delete operations, the delete could read stale state and both requests could report success.

This change applies the existing begin_immediate helper to collection deletion, serializing the read-modify-write sequence with other collection mutations.

Validation

  • cargo fmt --check
  • git diff --check
  • The focused Rust test command was attempted, but dependency resolution was blocked by an unavailable git submodule (googleapis/googleapis) required by gcloud-gax.

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@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)

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.

1 participant