coryan opened a new issue, #34063: URL: https://github.com/apache/arrow/issues/34063
### Describe the enhancement requested `GcsFileSystem` uses `ReadFromOffset()` to implement `Seek()` and reads from the beginning of the file. I think I was too clever by half and reused that to implement `ReadAt()`. The code works, because the download is interrupted when enough bytes are received. But the code is wasteful, because more data than needed may be returned by the service and consume memory in the local socket buffers, incur higher egress fees (if applicable) and potentially dirty the socket pool as these downloads do not terminate gracefully. `GcsFileSystem` should use `gcs::ReadRange(start, end)` in the implementation of `ReadAt()`. Fortunately both `gcs::ReadRange()` and `gcs::ReadFromOffset()` can be used at the same time, and when default initialized they have no effect. That means we can make the change with minimal changes. ### Component(s) C++ -- 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]
