zeroshade commented on code in PR #2054:
URL: https://github.com/apache/iceberg-go/pull/2054#discussion_r4257726816


##########
table/row_delta.go:
##########
@@ -234,6 +244,27 @@ func (rd *RowDelta) Commit(ctx context.Context) error {
 
        op := rd.Operation()
 
+       // Find live DVs that would be superseded by added DVs, regardless of
+       // whether removals are present. If any such live DVs exist and are not
+       // being removed, the commit must fail.
+       replacedLive, err := rd.findReplacedLiveDVs(fs, meta)

Review Comment:
   Minor: two delete-manifest walks when removals are present. Before this 
change, `resolveRemovedDeletes` collected `replacedLive` during the walk it 
already does. Now `findReplacedLiveDVs` walks every live delete manifest first 
and `resolveRemovedDeletes` walks them all again, so a delta that replaces DVs 
(the usual `RemoveDeletes` case) reads every delete manifest twice. Do one walk 
that gathers both `liveByPath` and `replacedLive`, and skip 
`findReplacedLiveDVs` when `resolveRemovedDeletes` is going to run.



-- 
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]

Reply via email to