Repository navigation
fix(table): ensure manifest length matches file size - #439
Conversation
|
@alexandre-normand @alexjo2144 can one or both of you please try out this PR and confirm it fixes your issue? I added tests and hit the spots I could find, but it would be great to get confirmation from you guys too. |
I'll run a test with this version now and report back in a few hours (it won't take that long to get results but I need to walk out and I'll be back on the computer later). Thanks for the prompt fix, @zeroshade! |
|
Confirmed the manifest's length matches the actual file size in s3 now. Querying the manifests from trino now shows files that aren't all the same fixed length (which we had previously) and we can confirm that the latest manifest has a size that matches the manifest length.
I am getting an error in querying the data from Trino now (which is actually an improvement over silently not getting any rows) but I suspect that it might be something on my end. I'll dig into it and report an issue if it turns out to be something else in iceberg-go. Thanks again for the fix, @zeroshade ! 🙇 |
There was a problem hiding this comment.
I also checked WriteManifestList 👍
Lines 1324 to 1352 in 43b308a
|
Thanks for chiming in everyone! Love the discussion here :) |

fixes #438
We need to ensure that we flush the manifest that we're writing before we construct the
ManifestFileobject we want to add to the snapshot so that our length is correct when we write the manifest list itself. This change adds unit tests to ensure that the lengths match up correctly with what we write, and also ensures the tests work on windows (ran into some problems when putting this PR together that I had to fix).