laskoviymishka commented on issue #2062: URL: https://github.com/apache/iceberg-go/issues/2062#issuecomment-5877183984
Good question, and the `io/fs` mirroring made sense, but our main backends are object stores and `Open` there is a network call. Today you can't cancel or put a deadline on a pending `Open`. `DeleteFiles` already takes a context, so I'd fix the base interface before v1. `io.IO` isn't used as an `fs.FS` today anyway: `Open` returns `io.File`, not `fs.File`, and the interface also has `Remove`. `FS(fs.FS) IO` still works. A reverse `AsFS` adapter can be added later if needed. The open question is reads: `io.Reader.Read` has no context. Do we tie the returned file to the `Open` context, or keep reads on a longer-lived context like `blobfs` does today? I lean toward tying it to `Open`. -- 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]
