[C++] Deprecate `RandomAccessFile::Read{At,Async}` without `allow_short_read`
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
In PR https://github.com/apache/arrow/pull/49897 we introduced overloads of `RandomAccessFile::ReadAt` and `RandomAccessFile::ReadAsync` with an additional `bool allow_short_read` argument. This ensures that the caller is conscious about the potential return value of these methods when the file is not large enough to satisfy the entire read.
The legacy `RandomAccessFile::ReadAt` and `RandomAccessFile::ReadAsync` methods without the new argument are slightly dangerous as the caller then has to check the length of the returned result. We should deprecate them and schedule them for removal in a bunch of versions (perhaps in 4 versions to give some time for callers to migrate their API usage?).
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.