Fixes #10489 Killing the CDC log table on CDC disable is unhelpful in many ways, partly because it can cause random exceptions on nodes trying to do a CDC-enabled write at the same time as log table is dropped, but also because it makes it impossible to collect data generated before CDC was turned off, but which is not yet consumed. Since data should be TTL:ed anyway, retaining the table should not really add any overhead beyond the compaction to eventually clear it. And user did set TTL=0 (disabled), then he is already responsible for clearing out the data. This also has the nice feature of meshing with the alternator streams semantics. Closes #10601
38 lines
659 B
C++
38 lines
659 B
C++
/*
|
|
* Copyright (C) 2020-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <seastar/core/sstring.hh>
|
|
|
|
#include "bytes.hh"
|
|
#include "dht/i_partitioner.hh"
|
|
|
|
class schema;
|
|
class partition_key_view;
|
|
|
|
namespace sstables {
|
|
|
|
class key_view;
|
|
|
|
}
|
|
|
|
namespace cdc {
|
|
|
|
struct cdc_partitioner final : public dht::i_partitioner {
|
|
static const sstring classname;
|
|
|
|
cdc_partitioner() = default;
|
|
virtual const sstring name() const override;
|
|
virtual dht::token get_token(const schema& s, partition_key_view key) const override;
|
|
virtual dht::token get_token(const sstables::key_view& key) const override;
|
|
};
|
|
|
|
|
|
}
|