Skip to content

Commit c3855b9

Browse files
authored
GH-46149: [C++] Opening dataset fails with sshfs-3.7.3 due to F_RDADVISE error (#46346)
### Rationale for this change Fix a bug where cache optimisation errors prevent files being read ### What changes are included in this PR? No longer treat `WillNeed` errors in `ReadRangeCache::Cache` as fatal ### Are these changes tested? No ### Are there any user-facing changes? No * GitHub Issue: #46149 Authored-by: Nic Crane <thisisnic@gmail.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>
1 parent 41f1de0 commit c3855b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cpp/src/arrow/io/caching.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ struct ReadRangeCache::Impl {
188188
entries = std::move(new_entries);
189189
}
190190
// Prefetch immediately, regardless of executor availability, if possible
191-
return file->WillNeed(ranges);
191+
auto st = file->WillNeed(ranges);
192+
// As this is optimisation only, I/O failures should not be treated as fatal
193+
if (st.IsIOError()) {
194+
return Status::OK();
195+
}
196+
return st;
192197
}
193198

194199
// Read the given range from the cache, blocking if needed. Cannot read a range

0 commit comments

Comments
 (0)