Files
scylladb/tools/load_system_tablets.hh
Avi Kivity 0ae22a09d4 LICENSE: Update to version 1.1
Updated terms of non-commercial use (must be a never-customer).
2026-04-12 19:46:33 +03:00

44 lines
1.2 KiB
C++

/*
* Copyright (C) 2024-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
*/
#pragma once
#include <filesystem>
#include <map>
#include <seastar/core/future.hh>
#include "reader_permit.hh"
#include "dht/token.hh"
#include "locator/tablets.hh"
#include "seastarx.hh"
namespace db {
class config;
}
namespace tools {
using tablets_t = std::map<dht::token, locator::tablet_replica_set>;
/// Load the rows of given table in "system.tablets" from its sstables
///
/// @param cfg the db config
/// @param scylla_data_path path to the scylla data directory, which is usually
/// /var/lib/scylla/data
/// @param keyspace_name the keyspace name of the table
/// @param table_name the table name of the table
/// @param permit the permit for performing read ops
/// @returns a map from last token to the replica set
future<tablets_t> load_system_tablets(const db::config& dbcfg,
std::filesystem::path scylla_data_path,
std::string_view keyspace_name,
std::string_view tablet_name,
reader_permit permit);
}