| 434 | cache_.makePins( |
| 435 | keys_, |
| 436 | [&](int32_t index) { return sizes_[index]; }, |
| 437 | [&](int32_t index, CachePin pin) { |
| 438 | if (isPrefetch) { |
| 439 | pin.checkedEntry()->setPrefetch(true); |
| 440 | } |
| 441 | pins.push_back(std::move(pin)); |
| 442 | ssdPins.push_back(std::move(requests_[index].ssdPin)); |
| 443 | }, |
| 444 | true); |
| 445 | if (pins.empty()) { |
| 446 | return pins; |
| 447 | } |
| 448 | assert(!ssdPins.empty()); // for lint. |
| 449 | auto stats = ssdPins[0].file()->load(ssdPins, pins); |
| 450 | updateStats(stats, isPrefetch, true); |
| 451 | return pins; |
| 452 | } |
| 453 | }; |
| 454 | |
| 455 | } // namespace |
| 456 | |
| 457 | void CachedBufferedInput::readRegion( |
| 458 | const std::vector<CacheRequest*>& requests, |
| 459 | bool prefetch) { |
| 460 | if (requests.empty() || (requests.size() == 1 && !prefetch)) { |
nothing calls this directly
no test coverage detected