| 25 | |
| 26 | |
| 27 | void RestoreChunkInfosTransform::transform(Chunk & chunk) |
| 28 | { |
| 29 | if (auto info = chunk.getChunkInfos().get<DeduplicationInfo>()) |
| 30 | { |
| 31 | throw Exception( |
| 32 | ErrorCodes::LOGICAL_ERROR, |
| 33 | "Chunk already has DeduplicationInfo when restoring chunk infos, existing deduplication info debug: {}, restoring chunk infos: {}", |
| 34 | info->debug(), |
| 35 | chunk_infos.debug()); |
| 36 | } |
| 37 | |
| 38 | auto old_infos = std::move(chunk.getChunkInfos()); |
| 39 | chunk.setChunkInfos(chunk_infos.clone()); |
| 40 | chunk.getChunkInfos().appendIfUniq(std::move(old_infos)); |
| 41 | |
| 42 | LOG_TEST(getLogger("RestoreChunks"), "Restoring chunk infos, result: {}", |
| 43 | chunk.getChunkInfos().debug()); |
| 44 | } |
| 45 | |
| 46 | |
| 47 | UpdateDeduplicationInfoWithViewIDTransform::UpdateDeduplicationInfoWithViewIDTransform(StorageIDMaybeEmpty view_id_, SharedHeader header_) |
nothing calls this directly
no test coverage detected