Revert "storage service: add repair colocated tablets rpc"
This reverts commit 11f045bb7c.
The rpc was added together with colocated tablets in 2025.4 to support a
"shared repair" operation of a group of colocated tablets that repairs
all of them and allows also for special behavior as opposed to repairing
a single specific tablet.
It is not used anymore because we decided to not repair all colocated
tablets in a single shared operation, but to repair only the base table,
and in a later release support repairing colocated tables individually.
We can remove the rpc in 2025.4 because it is introduced in the same
version.
This commit is contained in:
@@ -93,7 +93,6 @@ verb [[cancellable]] tablet_cleanup (raft::server_id dst_id, locator::global_tab
|
||||
verb [[cancellable]] table_load_stats_v1 (raft::server_id dst_id) -> locator::load_stats_v1;
|
||||
verb [[cancellable]] table_load_stats (raft::server_id dst_id) -> locator::load_stats;
|
||||
verb [[cancellable]] tablet_repair(raft::server_id dst_id, locator::global_tablet_id, service::session_id session [[version 2025.4]]) -> service::tablet_operation_repair_result;
|
||||
verb [[cancellable]] tablet_repair_colocated(raft::server_id dst_id, locator::global_tablet_id, std::vector<locator::global_tablet_id>, service::session_id session [[version 2025.4]]) -> service::tablet_operation_repair_result;
|
||||
verb [[]] estimate_sstable_volume(table_id table) -> uint64_t;
|
||||
verb [[]] sample_sstables(table_id table, uint64_t chunk_size, uint64_t n_chunks) -> utils::chunked_vector<temporary_buffer<char>>;
|
||||
|
||||
|
||||
@@ -724,7 +724,6 @@ static constexpr unsigned do_get_rpc_client_idx(messaging_verb verb) {
|
||||
case messaging_verb::TABLET_STREAM_DATA:
|
||||
case messaging_verb::TABLET_CLEANUP:
|
||||
case messaging_verb::TABLET_REPAIR:
|
||||
case messaging_verb::TABLET_REPAIR_COLOCATED:
|
||||
case messaging_verb::TABLE_LOAD_STATS_V1:
|
||||
case messaging_verb::TABLE_LOAD_STATS:
|
||||
case messaging_verb::WORK_ON_VIEW_BUILDING_TASKS:
|
||||
|
||||
@@ -206,12 +206,11 @@ enum class messaging_verb : int32_t {
|
||||
TABLE_LOAD_STATS = 77,
|
||||
ESTIMATE_SSTABLE_VOLUME = 78,
|
||||
SAMPLE_SSTABLES = 79,
|
||||
TABLET_REPAIR_COLOCATED = 80,
|
||||
REPAIR_UPDATE_COMPACTION_CTRL = 81,
|
||||
REPAIR_UPDATE_REPAIRED_AT_FOR_MERGE = 82,
|
||||
WORK_ON_VIEW_BUILDING_TASKS = 83,
|
||||
NOTIFY_BANNED = 84,
|
||||
LAST = 85,
|
||||
REPAIR_UPDATE_COMPACTION_CTRL = 80,
|
||||
REPAIR_UPDATE_REPAIRED_AT_FOR_MERGE = 81,
|
||||
WORK_ON_VIEW_BUILDING_TASKS = 82,
|
||||
NOTIFY_BANNED = 83,
|
||||
LAST = 84,
|
||||
};
|
||||
|
||||
} // namespace netw
|
||||
|
||||
@@ -6421,26 +6421,6 @@ future<service::tablet_operation_repair_result> storage_service::repair_tablet(l
|
||||
on_internal_error(slogger, "Got wrong tablet_operation_repair_result");
|
||||
}
|
||||
|
||||
future<service::tablet_operation_repair_result> storage_service::repair_colocated_tablets(locator::global_tablet_id base_tablet, std::vector<locator::global_tablet_id> tablets, service::session_id session_id) {
|
||||
auto base_repair_result = co_await repair_tablet(base_tablet, session_id);
|
||||
gc_clock::time_point min_repair_time = base_repair_result.repair_time;
|
||||
|
||||
// repair derived co-located tablets
|
||||
for (auto tablet : tablets) {
|
||||
if (tablet == base_tablet) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto tablet_repair_result = co_await repair_tablet(tablet, session_id);
|
||||
|
||||
min_repair_time = std::min(min_repair_time, tablet_repair_result.repair_time);
|
||||
}
|
||||
|
||||
co_return tablet_operation_repair_result {
|
||||
min_repair_time
|
||||
};
|
||||
}
|
||||
|
||||
future<> storage_service::clone_locally_tablet_storage(locator::global_tablet_id tablet, locator::tablet_replica leaving, locator::tablet_replica pending) {
|
||||
if (leaving.host != pending.host) {
|
||||
throw std::runtime_error(fmt::format("Leaving and pending tablet replicas belong to different nodes, {} and {} respectively",
|
||||
@@ -7777,12 +7757,6 @@ void storage_service::init_messaging_service() {
|
||||
co_return res;
|
||||
});
|
||||
});
|
||||
ser::storage_service_rpc_verbs::register_tablet_repair_colocated(&_messaging.local(), [handle_raft_rpc] (raft::server_id dst_id, locator::global_tablet_id base_tablet, std::vector<locator::global_tablet_id> tablets, rpc::optional<service::session_id> session_id) {
|
||||
return handle_raft_rpc(dst_id, [base_tablet, tablets = std::move(tablets), session_id = session_id.value_or(service::session_id::create_null_id())] (auto& ss) -> future<service::tablet_operation_repair_result> {
|
||||
auto res = co_await ss.repair_colocated_tablets(base_tablet, std::move(tablets), session_id);
|
||||
co_return res;
|
||||
});
|
||||
});
|
||||
ser::storage_service_rpc_verbs::register_tablet_cleanup(&_messaging.local(), [handle_raft_rpc] (raft::server_id dst_id, locator::global_tablet_id tablet) {
|
||||
return handle_raft_rpc(dst_id, [tablet] (auto& ss) {
|
||||
return ss.cleanup_tablet(tablet);
|
||||
|
||||
@@ -234,7 +234,6 @@ private:
|
||||
sstring op_name,
|
||||
std::function<future<service::tablet_operation_result>(locator::tablet_metadata_guard&)> op);
|
||||
future<service::tablet_operation_repair_result> repair_tablet(locator::global_tablet_id, service::session_id);
|
||||
future<service::tablet_operation_repair_result> repair_colocated_tablets(locator::global_tablet_id, std::vector<locator::global_tablet_id>, service::session_id);
|
||||
future<> stream_tablet(locator::global_tablet_id);
|
||||
// Clones storage of leaving tablet into pending one. Done in the context of intra-node migration,
|
||||
// when both of which sit on the same node. So all the movement is local.
|
||||
|
||||
Reference in New Issue
Block a user