Skip to content

chore(refactor): rename SnapshotProducer::manifest_file to produce_manifest_file_list - #2596

Merged
CTTY merged 5 commits into
apache:mainfrom
dannycjones:rename-snapshot-producer-manifest-file-fn
Jul 7, 2026
Merged

CTTY merged 5 commits into
apache:mainfrom
dannycjones:rename-snapshot-producer-manifest-file-fn

Conversation

@dannycjones

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

What changes are included in this PR?

Renames the trait method and adds rustdoc.

The change is pretty small, although risks impacting open PRs. I would recommend to either merge now or park for a while.

Originally suggested as the naming does not indicate what the purpose of the method is.

Are these changes tested?

N/A

@viirya viirya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The rename reads well: produce_manifest_file_list accurately describes what the method does — it collects existing manifests, writes a new manifest when there are added data files, and returns the Vec<ManifestFile> — which the old manifest_file (singular, getter-shaped) didn't convey. The rustdoc captures both the "collect" and "also writes" aspects.

One small thing the rename missed: the comment at snapshot.rs:470-471 still refers to the old name twice ("Calling self.summary() before self.manifest_file() ... after self.manifest_file() returns"). Since the whole point of this PR is naming clarity, it'd be worth updating those two references to produce_manifest_file_list too so the comment doesn't contradict the method it describes.

Otherwise LGTM — only call site updated, no stray references elsewhere, CI green.

@dannycjones

Copy link
Copy Markdown
Contributor Author

Thanks for catching those stale comments, a miss on my part! I've addressed those and merged in from main.

@dannycjones

Copy link
Copy Markdown
Contributor Author

@CTTY would you mind taking a look at this one?

@CTTY CTTY left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR Danny! I've left a comment

/// Collects the list of manifest files to be included in the new snapshot.
///
/// This method also writes the new manifests where required.
async fn produce_manifest_file_list<OP: SnapshotProduceOperation, MP: ManifestProcess>(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm thinking produce_manifest_files would better distinguish this from manifest list, which is a separate concept

Or produce_manifests, which is closer to java's terms. I'm happy with both!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Shawn, I think your suggestion makes sense. I've updated to produce_manifests and clarified the Rustdoc comment a bit more.

@dannycjones
dannycjones requested a review from CTTY July 7, 2026 18:03

@CTTY CTTY left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@CTTY
CTTY merged commit 894108b into apache:main Jul 7, 2026
21 checks passed
@dannycjones
dannycjones deleted the rename-snapshot-producer-manifest-file-fn branch July 8, 2026 09:12
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.

Rename SnapshotProducer::manifest_file

3 participants