This file contains facilities to dump the underlying mutations contained in various mutation sources -- like memtable, cache and sstables -- and return them as query results. This can be used with any table on the system. The output represents the mutation fragments which make up said mutations, and it will be generated according to a schema, which is a transformation of the table's schema. This file provides a method, which can be used to implement the backend of a select-statement: it has a similar signature to regular query methods.
27 lines
753 B
C++
27 lines
753 B
C++
/*
|
|
* Copyright (C) 2023-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "db/timeout_clock.hh"
|
|
#include "query-result.hh"
|
|
|
|
namespace replica::mutation_dump {
|
|
|
|
schema_ptr generate_output_schema_from_underlying_schema(schema_ptr underlying_schema);
|
|
|
|
future<foreign_ptr<lw_shared_ptr<query::result>>> dump_mutations(
|
|
sharded<database>& db,
|
|
schema_ptr output_schema, // must have been generated from `underlying_schema`, with `generate_output_schema_from_underlying_schema()`
|
|
schema_ptr underlying_schema,
|
|
const dht::partition_range_vector& pr,
|
|
const query::read_command& cmd,
|
|
db::timeout_clock::time_point timeout);
|
|
|
|
} // namespace replica::mutation_dump
|