We want to add strongly consistent tables as an option. We will have two kind of strongly consistent tables: globally consistent and locally consistent. The former means that requests from all DCs will be globally linearisable while the later - only requests to the same DCs will be linearisable. To allow configuring all the possibilities the patch adds new parameter to a keyspace definition "consistency" that can be configured to be `eventual`, `global` or `local`. Non eventual setting is supported for tablets enabled keyspaces only. Since we want to start with implementing local consistency configuring global consistency will result in an error for now.
24 lines
494 B
C++
24 lines
494 B
C++
/*
|
|
* Copyright (C) 2025-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <seastar/core/sstring.hh>
|
|
|
|
namespace data_dictionary {
|
|
enum class consistency_config_option : uint8_t {
|
|
eventual,
|
|
local,
|
|
global
|
|
};
|
|
|
|
consistency_config_option consistency_config_option_from_string(const seastar::sstring& str);
|
|
seastar::sstring consistency_config_option_to_string(consistency_config_option option);
|
|
}
|