Skip to content

[ENH]: add operator for garbage collection to list all files used by collection version #4466

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 1 commit into from
May 23, 2025

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented May 6, 2025

Description of changes

Does what the title says. Given a version file and a version, the operator constructs a complete list of files used by the collection version (including block files by traversing all sparse indices).

Test plan

How are these changes tested?

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

Tested in the next PR.

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

github-actions bot commented May 6, 2025

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 changed the title [ENH]: add operator for garbage collection to list all files for collection version [ENH]: add operator for garbage collection to list all files used by collection version May 7, 2025
@codetheweb codetheweb marked this pull request as ready for review May 7, 2025 00:06
@codetheweb codetheweb requested a review from Sicheng-Pan May 7, 2025 00:06
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 8e4042e to 34ed231 Compare May 13, 2025 17:35
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 0c85b47 to b989fec Compare May 13, 2025 17:35
Copy link
Contributor

propel-code-bot bot commented May 13, 2025

Add Operator to List All Files Used by a Collection Version (for Garbage Collection)

This PR introduces a new garbage collection operator that, given a collection version file and version number, enumerates all file paths associated with that collection version, including block files (by traversing sparse indices), HNSW index files, and sparse index files. Additionally, it registers the new operator in the module system and improves RootManager's debug output by implementing a Debug trait.

Key Changes:
• Added rust/garbage_collector/src/operators/list_files_at_version.rs: Implements ListFilesAtVersionsOperator to output all files relevant for a specific collection version, including careful traversal of version metadata and asynchronous fetching of block IDs from RootManager.
• Registered the new operator in rust/garbage_collector/src/operators/mod.rs.
• Implemented std::fmt::Debug for RootManager in rust/blockstore/src/arrow/provider.rs, aiding diagnostics.

Affected Areas:
• Garbage collector operators
• Blockstore's RootManager (Debug trait implementation)
• Module registration

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

@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 34ed231 to 9ca2cd5 Compare May 15, 2025 16:52
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from b989fec to b793a23 Compare May 15, 2025 16:52
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 9ca2cd5 to 0725564 Compare May 15, 2025 20:11
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from b793a23 to 282d440 Compare May 15, 2025 20:11
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 0725564 to dd8eba1 Compare May 15, 2025 22:38
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 282d440 to c0389ea Compare May 15, 2025 22:38
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from dd8eba1 to d7546c4 Compare May 15, 2025 22:43
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from c0389ea to 8b8f1bf Compare May 15, 2025 22:43
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from d7546c4 to 8242dc4 Compare May 15, 2025 23:27
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 8b8f1bf to 9853786 Compare May 15, 2025 23:27
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 8242dc4 to 5f592dc Compare May 15, 2025 23:34
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 9853786 to fc1cd49 Compare May 15, 2025 23:34
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 5f592dc to 3c829d0 Compare May 15, 2025 23:36
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from fc1cd49 to c9ec71e Compare May 15, 2025 23:36
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 3c829d0 to 8fa48f8 Compare May 15, 2025 23:38
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from c9ec71e to d357155 Compare May 15, 2025 23:38
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 8fa48f8 to c69db1a Compare May 15, 2025 23:47
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 8fe5f2f to afda731 Compare May 20, 2025 18:02
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 7a408ad to c3dbe3a Compare May 20, 2025 18:03
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from afda731 to 1ea19ad Compare May 20, 2025 18:43
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from c3dbe3a to 40357ea Compare May 20, 2025 18:44
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 1ea19ad to e949621 Compare May 20, 2025 19:42
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 40357ea to aa00a67 Compare May 20, 2025 19:42
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from e949621 to 91a3c81 Compare May 21, 2025 16:45
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from aa00a67 to a124ff5 Compare May 21, 2025 16:45
version.version,
collection_id,
);
tracing::trace!(
Copy link
Contributor

@sanketkedia sanketkedia May 22, 2025

Choose a reason for hiding this comment

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

why two traces here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they have different log levels
the second one is very verbose

@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from 91a3c81 to f71445b Compare May 22, 2025 23:24
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from a124ff5 to 20cf4db Compare May 22, 2025 23:24
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch from f71445b to c2e5444 Compare May 22, 2025 23:58
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 20cf4db to 100a8d5 Compare May 22, 2025 23:59
@codetheweb codetheweb force-pushed the feat-gc-forked-compute-versions-to-delete branch 2 times, most recently from 56724a9 to 0197f05 Compare May 23, 2025 00:47
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 100a8d5 to 9accc22 Compare May 23, 2025 00:47
@codetheweb codetheweb changed the base branch from feat-gc-forked-compute-versions-to-delete to graphite-base/4466 May 23, 2025 01:25
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 9accc22 to 4b76db0 Compare May 23, 2025 01:25
@codetheweb codetheweb force-pushed the graphite-base/4466 branch from 0197f05 to 8fd33ad Compare May 23, 2025 01:25
@graphite-app graphite-app bot changed the base branch from graphite-base/4466 to main May 23, 2025 01:25
@codetheweb codetheweb force-pushed the feat-gc-list-files-at-version-operator branch from 4b76db0 to 43ad358 Compare May 23, 2025 01:25
@codetheweb codetheweb merged commit 1676e9e into main May 23, 2025
72 checks passed
Copy link
Contributor Author

Merge activity

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.

3 participants