The repair_time in system.tablets will be updated when repair runs
successfully. We can now use it to update the repair time for tombstone
gc, i.e, when the system.tablets.repair_time is propagated, call
gc_state.update_repair_time() on the node that is the owner of the
tablet.
Since b3b3e880d3 ("repair: Reduce hints and batchlog flush"), the
repair time that could be used for tombstone gc might be smaller than
when the repair is started, so the actual repair time for tombstone gc
is returned by the repair rpc call from the repair master node.
Fixes #17507
75 lines
1.9 KiB
C++
75 lines
1.9 KiB
C++
/*
|
|
* Copyright 2022-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#include "service/tablet_operation.hh"
|
|
|
|
namespace locator {
|
|
|
|
struct tablet_id final {
|
|
uint64_t value();
|
|
};
|
|
|
|
struct global_tablet_id final {
|
|
::table_id table;
|
|
locator::tablet_id tablet;
|
|
};
|
|
|
|
struct table_load_stats final {
|
|
uint64_t size_in_bytes;
|
|
int64_t split_ready_seq_number;
|
|
};
|
|
|
|
struct load_stats final {
|
|
std::unordered_map<::table_id, locator::table_load_stats> tables;
|
|
};
|
|
|
|
}
|
|
|
|
namespace service {
|
|
struct fencing_token {
|
|
service::topology::version_t topology_version;
|
|
};
|
|
|
|
struct raft_topology_cmd {
|
|
enum class command: uint8_t {
|
|
barrier,
|
|
barrier_and_drain,
|
|
stream_ranges,
|
|
wait_for_ip
|
|
};
|
|
service::raft_topology_cmd::command cmd;
|
|
};
|
|
|
|
struct raft_topology_cmd_result {
|
|
enum class command_status: uint8_t {
|
|
fail,
|
|
success
|
|
};
|
|
service::raft_topology_cmd_result::command_status status;
|
|
};
|
|
|
|
struct raft_snapshot {
|
|
utils::chunked_vector<canonical_mutation> mutations;
|
|
};
|
|
|
|
struct raft_snapshot_pull_params {
|
|
std::vector<table_id> tables;
|
|
};
|
|
|
|
struct tablet_operation_repair_result {
|
|
gc_clock::time_point repair_time;
|
|
};
|
|
|
|
verb raft_topology_cmd (raft::server_id dst_id, raft::term_t term, uint64_t cmd_index, service::raft_topology_cmd) -> service::raft_topology_cmd_result;
|
|
verb [[cancellable]] raft_pull_snapshot (raft::server_id dst_id, service::raft_snapshot_pull_params) -> service::raft_snapshot;
|
|
verb [[cancellable]] tablet_stream_data (raft::server_id dst_id, locator::global_tablet_id);
|
|
verb [[cancellable]] tablet_cleanup (raft::server_id dst_id, locator::global_tablet_id);
|
|
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::tablet_operation_repair_result;
|
|
}
|