Skip to content

Conversation

@ferhatelmas
Copy link
Contributor

related to #644

if err != nil {
return nil, err
}
defer internal.CheckedClose(wr, &err)
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't cause an error when we successfully call close at line 300?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

iceberg-go/manifest.go

Lines 1124 to 1126 in 9e4a5b7

if w.closed {
return nil
}

no because it's no-op, Close() sets closed field to true (first defer) and when it's true (second defer), it returns early

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good then. Is there anything else needed before you shift this out of Draft?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reviewed for the pattern if there were more and found a few more cases. Fixed and added a regression test, should be good to go now. Marking ready

Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

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

just one nitpick question but otherwise looks good!

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas ferhatelmas marked this pull request as ready for review January 8, 2026 00:50
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

LGTM! I double checked for all usage of NewManifestWriter and ManifestListWriter

@zeroshade zeroshade merged commit 1d3320a into apache:main Jan 8, 2026
11 checks passed
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