Fix for using part after std::move from it

This commit is contained in:
Alexander Gololobov 2024-09-17 17:49:02 +02:00
parent 190d3f04c9
commit 3674c97ebb

View File

@ -387,8 +387,8 @@ void DefaultCoordinator::initializeReadingState(InitialAllRangesAnnouncement ann
if (intersecting_it != known_parts.end() && !intersecting_it->description.info.isDisjoint(part.info))
throw Exception(ErrorCodes::LOGICAL_ERROR, "Intersecting parts found in announcement");
all_parts_to_read.push_back(Part{.description = std::move(part), .replicas = {announcement.replica_num}});
known_parts.emplace(Part{.description = part, .replicas = {}});
all_parts_to_read.push_back(Part{.description = std::move(part), .replicas = {announcement.replica_num}});
}
}