feat: add snapshot cached manifests#444
Merged
wgtmac merged 1 commit intoapache:mainfrom Dec 30, 2025
Merged
Conversation
wgtmac
reviewed
Dec 29, 2025
src/iceberg/snapshot.h
Outdated
|
|
||
| /// \brief Cache structure for storing loaded manifests | ||
| struct ManifestsCache { | ||
| std::vector<ManifestFile> all_manifests; |
Member
There was a problem hiding this comment.
Can we avoid caching 2X manifest files here? As we return std::span for different manifests, perhaps we can use a single vector to store data manifests in the head and then delete manifests in the tail, and then use the split point to construct different spans to return.
src/iceberg/snapshot.h
Outdated
| } | ||
|
|
||
| /// \brief Default constructor | ||
| Snapshot(); |
Member
There was a problem hiding this comment.
If we have to add ctor to it, what about removing the default ctor and adding ctor for all member variables and Snapshot::Make for validated object creation? The Java BaseSnapshot has two ctors for v1 and others respectively.
39bd868 to
8df5115
Compare
wgtmac
approved these changes
Dec 30, 2025
| /// Field id: 503 | ||
| /// ID of the snapshot where the manifest file was added | ||
| int64_t added_snapshot_id = Snapshot::kInvalidSnapshotId; | ||
| int64_t added_snapshot_id = -1; // Snapshot::kInvalidSnapshotId |
Member
There was a problem hiding this comment.
nit: we can move kInvalidSnapshotId to iceberg/constants.h.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.