Skip to content

Conversation

@rescrv
Copy link
Contributor

@rescrv rescrv commented Jun 20, 2025

Description of changes

PR #4722 introduced a new field to the CheckCollectionsResponse, but
does not populate the slice/array necessary to return the result, ending
up in a null-ptr deref. This PR populates the array at top of the loop.

Test plan

CI + review

Documentation Changes

N/A

PR #4722 introduced a new field to the CheckCollectionsResponse, but
does not populate the slice/array necessary to return the result, ending
up in a null-ptr deref.  This PR populates the array at top of the loop.
@propel-code-bot
Copy link
Contributor

This PR addresses a null pointer dereference issue in the CheckCollections gRPC method by ensuring the LogPosition slice is properly allocated before use. This resolves a panic introduced by PR #4722 when the LogPosition field was added but not initialized.

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

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

@rescrv rescrv requested a review from sanketkedia June 20, 2025 17:27
@rescrv rescrv merged commit c3c23f3 into main Jun 20, 2025
113 of 115 checks passed
@rescrv rescrv deleted the rescrv/sysdb-bug branch June 20, 2025 17:56
chroma-droid pushed a commit that referenced this pull request Jun 20, 2025
## Description of changes

PR #4722 introduced a new field to the CheckCollectionsResponse, but
does not populate the slice/array necessary to return the result, ending
up in a null-ptr deref.  This PR populates the array at top of the loop.

## Test plan

CI + review

## Documentation Changes

N/A
rescrv added a commit that referenced this pull request Jun 20, 2025
This PR cherry-picks the commit c3c23f3
onto rc/2025-06-20. If there are unresolved conflicts, please resolve
them manually.

Co-authored-by: Robert Escriva <[email protected]>
eculver added a commit that referenced this pull request Jun 25, 2025
… flexible (#4912)

## Summary
This adds a test for the `CheckCollections` method. This would have
caught the issue fixed in #4899.

Along the way, I discovered how these tests need some love, so I started
down this path by introducing a new `daotest` package that provides
testing helpers for creating `Collection` values that are easier to
configure. Instead of having to potentially debug all the tests that use
`dao.CreateTestCollection`, I defined a "shim" that can be used as a
stop-gap so that I can change the signature of this
`dao.CreateTestCollection` without potentially derailing the original
goal which was just to add some missing test coverage.

- Improvements & Bug fixes
  - Added test coverage for `CheckCollections` service endpoint
- New functionality
- Added `daotest` package and `NewTestCollection` helper with
builder/options methods for more configurability

## Test plan

All the tests are passing.

## Documentation Changes

N/A
Inventrohyder pushed a commit to Inventrohyder/chroma that referenced this pull request Aug 5, 2025
## Description of changes

PR chroma-core#4722 introduced a new field to the CheckCollectionsResponse, but
does not populate the slice/array necessary to return the result, ending
up in a null-ptr deref.  This PR populates the array at top of the loop.

## Test plan

CI + review

## Documentation Changes

N/A
Inventrohyder pushed a commit to Inventrohyder/chroma that referenced this pull request Aug 5, 2025
… flexible (chroma-core#4912)

## Summary
This adds a test for the `CheckCollections` method. This would have
caught the issue fixed in chroma-core#4899.

Along the way, I discovered how these tests need some love, so I started
down this path by introducing a new `daotest` package that provides
testing helpers for creating `Collection` values that are easier to
configure. Instead of having to potentially debug all the tests that use
`dao.CreateTestCollection`, I defined a "shim" that can be used as a
stop-gap so that I can change the signature of this
`dao.CreateTestCollection` without potentially derailing the original
goal which was just to add some missing test coverage.

- Improvements & Bug fixes
  - Added test coverage for `CheckCollections` service endpoint
- New functionality
- Added `daotest` package and `NewTestCollection` helper with
builder/options methods for more configurability

## Test plan

All the tests are passing.

## Documentation Changes

N/A
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.

4 participants