Files
scylladb/tools/load_system_tablets.hh
Avi Kivity f3eade2f62 treewide: relicense to ScyllaDB-Source-Available-1.0
Drop the AGPL license in favor of a source-available license.
See the blog post [1] for details.

[1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
2024-12-18 17:45:13 +02:00

44 lines
1.2 KiB
C++

/*
* Copyright (C) 2024-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
*/
#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);
}