tanmayrauth commented on code in PR #1225:
URL: https://github.com/apache/iceberg-go/pull/1225#discussion_r3436717882
##########
table/rolling_data_writer.go:
##########
@@ -429,6 +428,8 @@ func (r *RollingDataWriter) closeAndWait() error {
return fmt.Errorf("error in rolling data writer: %w", err)
}
+ r.cancel()
Review Comment:
Moving cancel() to the end of closeAndWait means it's skipped on the error
return, so the context leaks whenever a writer errors. defer r.cancel() near
the top keeps the drain-before-cancel ordering (it still runs after wg.Wait())
while always firing.
--
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]