network_topology_strategy: Preserve fields of task_info in reallocate_tablets

So other fields will not be dropped when the new tablet is created.
This commit is contained in:
Asias He
2024-10-29 09:27:39 +08:00
parent b14871ad3f
commit c975882e03

View File

@@ -353,8 +353,9 @@ future<tablet_map> network_topology_strategy::reallocate_tablets(schema_ptr s, t
tablet_logger.debug("Allocating tablets for {}.{} ({}): dc_rep_factor={} tablet_count={}", s->ks_name(), s->cf_name(), s->id(), _dc_rep_factor, tablets.tablet_count());
for (tablet_id tb : tablets.tablet_ids()) {
auto replicas = co_await reallocate_tablets(s, tm, load, tablets, tb);
tablets.set_tablet(tb, tablet_info{std::move(replicas)});
auto tinfo = tablets.get_tablet_info(tb);
tinfo.replicas = co_await reallocate_tablets(s, tm, load, tablets, tb);
tablets.set_tablet(tb, std::move(tinfo));
}
tablet_logger.debug("Allocated tablets for {}.{} ({}): dc_rep_factor={}: {}", s->ks_name(), s->cf_name(), s->id(), _dc_rep_factor, tablets);