manuzhang commented on code in PR #1104:
URL: https://github.com/apache/iceberg-cpp/pull/1104#discussion_r4523634955
##########
src/iceberg/update/rewrite_manifests.cc:
##########
@@ -311,11 +326,20 @@ Status RewriteManifests::ValidateDeletedManifests(
int64_t current_snapshot_id) const {
// Directly deleted manifests must still be present in the current snapshot.
for (const auto& manifest : deleted_manifests_) {
- if (!current_manifests.contains(manifest)) {
+ auto current = current_manifests.find(manifest);
+ if (current == current_manifests.end()) {
return ValidationFailed(
"Deleted manifest {} could not be found in the latest snapshot {}",
manifest.manifest_path, current_snapshot_id);
}
+ // A prior update may reuse this path with new inherited values on replay.
+ // The caller's replacement still contains the original values.
+ if (manifest.sequence_number != current->sequence_number ||
+ manifest.min_sequence_number != current->min_sequence_number ||
+ manifest.first_row_id != current->first_row_id) {
Review Comment:
This might change when a manifest is firstly added and removed later.
Another case is when a V2 manifest is upgraded to V3 in parallel.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]