laskoviymishka commented on code in PR #2743:
URL: https://github.com/apache/iceberg-go/pull/2743#discussion_r4730081874
##########
io/mem.go:
##########
@@ -92,6 +92,8 @@ func (m *MemFS) Remove(_ context.Context, name string) error {
return nil
}
+// Create opens a writer for name. Write sequentially and finish writing before
+// closing. Multiple callers may close the writer concurrently.
Review Comment:
Could we say here that the first Close result is final? Inside `closeOnce`
the buffer is dropped whether `WriteFile` succeeds or not, so after a canceled
ctx every later Close returns the same error and the data is gone
([mem.go#L374-L381](https://github.com/apache/iceberg-go/blob/2d3df03550cefa60522fcd06a6a49385e263893a/io/mem.go#L374-L381)).
Optional.
```suggestion
// closing. Multiple callers may close the writer concurrently. Every Close
// returns the first Close's result, and a failed Close discards buffered
data.
```
--
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]