| 124 | } |
| 125 | |
| 126 | bool ScanRange::FileHandleCacheEnabled() const { |
| 127 | // Global flag for all file handle caching |
| 128 | if (!is_file_handle_caching_enabled()) return false; |
| 129 | |
| 130 | if (expected_local_ && IsHdfsPath(file())) return true; |
| 131 | if (FLAGS_cache_remote_file_handles) { |
| 132 | if (disk_id_ == io_mgr_->RemoteDfsDiskId()) return true; |
| 133 | } |
| 134 | |
| 135 | if (FLAGS_cache_ozone_file_handles) { |
| 136 | if (expected_local_ && IsOzonePath(file())) return true; |
| 137 | if (disk_id_ == io_mgr_->RemoteOzoneDiskId()) return true; |
| 138 | } |
| 139 | |
| 140 | if (FLAGS_cache_s3_file_handles) { |
| 141 | if (disk_id_ == io_mgr_->RemoteS3DiskId()) return true; |
| 142 | } |
| 143 | |
| 144 | if (FLAGS_cache_abfs_file_handles) { |
| 145 | if (disk_id_ == io_mgr_->RemoteAbfsDiskId()) return true; |
| 146 | } |
| 147 | |
| 148 | return false; |
| 149 | } |
| 150 | |
| 151 | ReadOutcome ScanRange::DoReadInternal(DiskQueue* queue, int disk_id, bool use_local_buff, |
| 152 | bool use_mem_buffer, shared_lock<shared_mutex>* local_file_lock) { |
no test coverage detected