| 70 | } |
| 71 | |
| 72 | void initializeCache( |
| 73 | int64_t maxBytes, |
| 74 | int64_t ssdBytes = 0, |
| 75 | bool setNoCowFlag = false) { |
| 76 | // tmpfs does not support O_DIRECT, so turn this off for testing. |
| 77 | FLAGS_bolt_ssd_odirect = false; |
| 78 | cache_ = AsyncDataCache::create(memory::memoryManager()->allocator()); |
| 79 | |
| 80 | fileName_ = StringIdLease(fileIds(), "fileInStorage"); |
| 81 | |
| 82 | tempDirectory_ = exec::test::TempDirectoryPath::create(); |
| 83 | ssdFile_ = std::make_unique<SsdFile>( |
| 84 | fmt::format("{}/ssdtest", tempDirectory_->path), |
| 85 | 0, // shardId |
| 86 | bits::roundUp(ssdBytes, SsdFile::kRegionSize) / SsdFile::kRegionSize, |
| 87 | 0, // checkpointInternalBytes |
| 88 | setNoCowFlag); |
| 89 | } |
| 90 | |
| 91 | static void initializeContents(int64_t sequence, memory::Allocation& alloc) { |
| 92 | bool first = true; |
nothing calls this directly
no test coverage detected