| 1195 | } |
| 1196 | |
| 1197 | Future<Reference<IBackupFile>> BackupContainerFileSystem::writeRangeFile(Version snapshotBeginVersion, |
| 1198 | int snapshotFileCount, |
| 1199 | Version fileVersion, |
| 1200 | int blockSize) { |
| 1201 | std::string fileName = format( |
| 1202 | "range,%" PRId64 ",%s,%d", fileVersion, deterministicRandom()->randomUniqueID().toString().c_str(), blockSize); |
| 1203 | |
| 1204 | // In order to test backward compatibility in simulation, sometimes write to the old path format |
| 1205 | if (g_network->isSimulated() && deterministicRandom()->coinflip()) { |
| 1206 | return writeFile(BackupContainerFileSystemImpl::old_rangeVersionFolderString(fileVersion) + fileName); |
| 1207 | } |
| 1208 | |
| 1209 | return writeFile(BackupContainerFileSystemImpl::snapshotFolderString(snapshotBeginVersion) + |
| 1210 | format("/%d/", snapshotFileCount / (BUGGIFY ? 1 : 5000)) + fileName); |
| 1211 | } |
| 1212 | |
| 1213 | Future<std::pair<std::vector<RangeFile>, std::map<std::string, KeyRange>>> |
| 1214 | BackupContainerFileSystem::readKeyspaceSnapshot(KeyspaceSnapshotFile snapshot) { |
no test coverage detected