locator: topology: Fix move assignment
Defaulted assignment doesn't update node::_topology.
This commit is contained in:
@@ -99,6 +99,14 @@ topology::topology(topology&& o) noexcept
|
||||
}
|
||||
}
|
||||
|
||||
topology& topology::operator=(topology&& o) noexcept {
|
||||
if (this != &o) {
|
||||
this->~topology();
|
||||
new (this) topology(std::move(o));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
future<topology> topology::clone_gently() const {
|
||||
topology ret(_cfg);
|
||||
tlogger.debug("topology[{}]: clone_gently to {} from shard {}", fmt::ptr(this), fmt::ptr(&ret), _shard);
|
||||
|
||||
@@ -111,11 +111,13 @@ public:
|
||||
inet_address this_endpoint;
|
||||
endpoint_dc_rack local_dc_rack;
|
||||
bool disable_proximity_sorting = false;
|
||||
|
||||
bool operator==(const config&) const = default;
|
||||
};
|
||||
topology(config cfg);
|
||||
topology(topology&&) noexcept;
|
||||
|
||||
topology& operator=(topology&&) = default;
|
||||
topology& operator=(topology&&) noexcept;
|
||||
|
||||
future<topology> clone_gently() const;
|
||||
future<> clear_gently() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user