Files
scylla/idl/storage_service.idl.hh
Gleb Natapov d576ed31dc storage_service: topology request: drop explicit shutdown rpc
Now that we have explicit status for each request we may use it to
replace shutdown notification rpc. During a decommission, in
left_token_ring state, we set done to true after metadata barrier
that waits for all request to the decommissioning node to complete
and notify the decommissioning node with a regular barrier. At this
point the node will see that the request is complete and exit.
2024-01-16 17:02:54 +02:00

58 lines
1.4 KiB
C++

/*
* Copyright 2022-present ScyllaDB
*/
/*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace locator {
struct tablet_id final {
uint64_t value();
};
struct global_tablet_id final {
::table_id table;
locator::tablet_id tablet;
};
}
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_topology_snapshot {
std::vector<canonical_mutation> topology_mutations;
std::vector<canonical_mutation> cdc_generation_mutations;
std::vector<canonical_mutation> topology_requests_mutations;
};
struct raft_topology_pull_params {};
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_topology_snapshot (raft::server_id dst_id, service::raft_topology_pull_params) -> service::raft_topology_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);
}