Skip to content

[BUG]: v0 in version file for forked collection missing segment file paths from source collection #4550

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 3 commits into from
May 15, 2025

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented May 14, 2025

Description of changes

Prior to this fix, v0 in the version file for forked collections was missing the segment file paths from the source collection.

There was a similar bug where if segment file paths were provided during the creation of a new collection, those file paths would also be absent from v0 in the version file (we currently never provide segment file paths upon creation, but seemed good to fix as well).

Test plan

How are these changes tested?

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

Updated existing Go integration tests to check the created version file.

Documentation Changes

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

n/a

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)

@codetheweb codetheweb marked this pull request as ready for review May 15, 2025 00:23
@codetheweb codetheweb requested a review from Sicheng-Pan May 15, 2025 00:23
Copy link
Contributor

Fix Missing Segment File Paths in Version File for Forked Collections

This PR fixes a bug where the v0 version file for forked collections was missing segment file paths from the source collection. It also fixes a similar issue where segment file paths provided during the creation of a new collection would be absent from v0 in the version file.

Key Changes:
• Replaced model.CreateSegment with model.Segment to ensure file paths are included
• Added code to copy segment.FilePaths when forking a collection
• Added validation in tests to verify segment file paths are properly included in version files

Affected Areas:
• go/pkg/sysdb/coordinator/
• go/pkg/sysdb/grpc/
• go/pkg/sysdb/coordinator/model/

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

Copy link
Contributor

@Sicheng-Pan Sicheng-Pan left a comment

Choose a reason for hiding this comment

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

Lgtm

@codetheweb codetheweb merged commit 7202f83 into main May 15, 2025
70 checks passed
@codetheweb codetheweb deleted the bug-forked-version-file-segment-file-paths branch May 15, 2025 16:42
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