Repository navigation
fix(catalog): ensure we close metadata writers - #666
Conversation
|
@tlarsendataguy could you take a look and see if you can confirm this fixes the issue you saw? |
| default: | ||
| return fmt.Errorf("unsupported write metadata compression codec: %s", compression) |
There was a problem hiding this comment.
Change seems correct functionally.
If it's fine to refactor a bit, I would move validation to the top so that if wrong input codec is given, it can skip creating a writer and closing it completely, instead return early
There was a problem hiding this comment.
is the new version pretty much what you were thinking?
|
I think it's not the right fix because failure happens only on wrong input which is deterministic but #644 sounds like it's operational (i.e. network error). Regardless, this is a solid fix but a different one. |
|
@zeroshade, @ferhatelmas I'll see what I can do to test this and #667. I don't have a good test, either. I only got my failure after 2-3 days of running my pipeline at full capacity. |
While looking into #644 I found exactly one location which seems that we could end up failing to close a writer. So this fixes that spot and properly uses our
CheckedCloseutility to ensure we close the file writer.In theory this should fix #644 but I haven't yet been able to write a good test for this.