diff options
Diffstat (limited to 'dev-db/scylla/files')
-rw-r--r-- | dev-db/scylla/files/0001-repair-Repair-tables-in-parallel.patch | 44 | ||||
-rw-r--r-- | dev-db/scylla/files/0001-thrift-support-version-0.11-after-THRIFT-2221.patch | 552 | ||||
-rw-r--r-- | dev-db/scylla/files/10-scylla.conf | 2 | ||||
-rw-r--r-- | dev-db/scylla/files/3.1-revert-64-bit-gc_clock.patch | 26 | ||||
-rw-r--r-- | dev-db/scylla/files/3.1-thrift-support.patch | 543 | ||||
-rw-r--r-- | dev-db/scylla/files/3.1.2-fix-read-amplification.patch | 13 | ||||
-rw-r--r-- | dev-db/scylla/files/boost-1.65.0-icl-ttp-matching.patch | 37 | ||||
-rw-r--r-- | dev-db/scylla/files/fix-fmt-3.5.0-compilation.patch | 94 | ||||
-rw-r--r-- | dev-db/scylla/files/scylla-server.confd | 17 | ||||
-rw-r--r-- | dev-db/scylla/files/scylla-server.initd | 37 | ||||
-rw-r--r-- | dev-db/scylla/files/scylla.sudoers | 1 | ||||
-rw-r--r-- | dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch | 27 |
12 files changed, 0 insertions, 1393 deletions
diff --git a/dev-db/scylla/files/0001-repair-Repair-tables-in-parallel.patch b/dev-db/scylla/files/0001-repair-Repair-tables-in-parallel.patch deleted file mode 100644 index 6b70bd4..0000000 --- a/dev-db/scylla/files/0001-repair-Repair-tables-in-parallel.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 71b9eaaf6ec2c22715b772315321c28cdcfecdae Mon Sep 17 00:00:00 2001 -Message-Id: <71b9eaaf6ec2c22715b772315321c28cdcfecdae.1574946436.git.asias@scylladb.com> -From: Asias He <asias@scylladb.com> -Date: Thu, 28 Nov 2019 20:41:25 +0800 -Subject: [PATCH scylla] repair: Repair tables in parallel -To: scylladb-dev@googlegroups.com - ---- - repair/repair.cc | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/repair/repair.cc b/repair/repair.cc -index c3e72854d6..3485605d4a 100644 ---- a/repair/repair.cc -+++ b/repair/repair.cc -@@ -938,6 +938,8 @@ static future<> repair_cf_range(repair_info& ri, - }); - } - -+static thread_local semaphore tables_parallelism_semaphore(16); -+ - // Repair a single local range, multiple column families. - // Comparable to RepairSession in Origin - static future<> repair_range(repair_info& ri, const dht::token_range& range) { -@@ -956,13 +958,15 @@ static future<> repair_range(repair_info& ri, const dht::token_range& range) { - neighbors.swap(live_neighbors); - } - return ::service::get_local_migration_manager().sync_schema(ri.db.local(), neighbors).then([&neighbors, &ri, range, id] { -- return do_for_each(ri.cfs.begin(), ri.cfs.end(), [&ri, &neighbors, range] (auto&& cf) { -+ return parallel_for_each(ri.cfs.begin(), ri.cfs.end(), [&ri, &neighbors, range] (auto&& cf) { -+ return with_semaphore(tables_parallelism_semaphore, 1, [&ri, &neighbors, &cf, range] { - ri._sub_ranges_nr++; - if (ri.row_level_repair()) { - return repair_cf_range_row_level(ri, cf, range, neighbors); - } else { - return repair_cf_range(ri, cf, range, neighbors); - } -+ }); - }); - }); - }); --- -2.23.0 - diff --git a/dev-db/scylla/files/0001-thrift-support-version-0.11-after-THRIFT-2221.patch b/dev-db/scylla/files/0001-thrift-support-version-0.11-after-THRIFT-2221.patch deleted file mode 100644 index 36004bb..0000000 --- a/dev-db/scylla/files/0001-thrift-support-version-0.11-after-THRIFT-2221.patch +++ /dev/null @@ -1,552 +0,0 @@ -diff --git a/configure.py b/configure.py -index 49796873a..00b046f16 100755 ---- a/configure.py -+++ b/configure.py -@@ -1056,6 +1056,12 @@ if not os.path.exists(xxhash_dir) or not os.listdir(xxhash_dir): - if not args.staticboost: - args.user_cflags += ' -DBOOST_TEST_DYN_LINK' - -+# thrift version detection, see #4538 -+thrift_version = subprocess.check_output(["thrift", "-version"]).decode("utf-8").split(" ")[-1] -+if int(thrift_version.replace(".", "")) < 110: -+ print('Note: thrift version < 0.11.0 detected, using boost symbols') -+ args.user_cflags += ' -DTHRIFT_USES_BOOST' -+ - for pkg in pkgs: - args.user_cflags += ' ' + pkg_config('--cflags', pkg) - libs += ' ' + pkg_config('--libs', pkg) -diff --git a/thrift/handler.cc b/thrift/handler.cc -index 31d1d789e..b6a58819c 100644 ---- a/thrift/handler.cc -+++ b/thrift/handler.cc -@@ -54,6 +54,12 @@ - #include "query-result-reader.hh" - #include "thrift/server.hh" - -+#ifdef THRIFT_USES_BOOST -+namespace thrift_std = tcxx; -+#else -+namespace thrift_std = std; -+#endif -+ - using namespace ::apache::thrift; - using namespace ::apache::thrift::protocol; - namespace thrift_transport = ::apache::thrift::transport; -@@ -68,7 +74,7 @@ class unimplemented_exception : public std::exception { - virtual const char* what() const throw () override { return "sorry, not implemented"; } - }; - --void pass_unimplemented(const tcxx::function<void(::apache::thrift::TDelayedException* _throw)>& exn_cob) { -+void pass_unimplemented(const thrift_std::function<void(::apache::thrift::TDelayedException* _throw)>& exn_cob) { - exn_cob(::apache::thrift::TDelayedException::delayException(unimplemented_exception())); - } - -@@ -118,8 +124,8 @@ class delayed_exception_wrapper : public ::apache::thrift::TDelayedException { - - template <typename Func, typename T> - void --with_cob(tcxx::function<void (const T& ret)>&& cob, -- tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, -+with_cob(thrift_std::function<void (const T& ret)>&& cob, -+ thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, - Func&& func) { - // then_wrapped() terminates the fiber by calling one of the cob objects - futurize<noexcept_movable_t<T>>::apply([func = std::forward<Func>(func)] { -@@ -136,8 +142,8 @@ with_cob(tcxx::function<void (const T& ret)>&& cob, - - template <typename Func> - void --with_cob(tcxx::function<void ()>&& cob, -- tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, -+with_cob(thrift_std::function<void ()>&& cob, -+ thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, - Func&& func) { - // then_wrapped() terminates the fiber by calling one of the cob objects - futurize<void>::apply(func).then_wrapped([cob = std::move(cob), exn_cob = std::move(exn_cob)] (future<> f) { -@@ -153,7 +159,7 @@ with_cob(tcxx::function<void ()>&& cob, - - template <typename Func> - void --with_exn_cob(tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, Func&& func) { -+with_exn_cob(thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, Func&& func) { - // then_wrapped() terminates the fiber by calling one of the cob objects - futurize<void>::apply(func).then_wrapped([exn_cob = std::move(exn_cob)] (future<> f) { - try { -@@ -202,7 +208,7 @@ class thrift_handler : public CassandraCobSvIf { - template <typename Cob, typename Func> - void - with_schema(Cob&& cob, -- tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, -+ thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, - const std::string& cf, - Func&& func) { - with_cob(std::move(cob), std::move(exn_cob), [this, &cf, func = std::move(func)] { -@@ -226,7 +232,7 @@ class thrift_handler : public CassandraCobSvIf { - return _query_state.get_client_state().validate_login(); - }; - -- void login(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const AuthenticationRequest& auth_request) { -+ void login(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const AuthenticationRequest& auth_request) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auth::authenticator::credentials_map creds(auth_request.credentials.begin(), auth_request.credentials.end()); - auto& auth_service = *_query_state.get_client_state().get_auth_service(); -@@ -236,13 +242,13 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void set_keyspace(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void set_keyspace(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - _query_state.get_client_state().set_keyspace(_db, keyspace); - }); - } - -- void get(tcxx::function<void(ColumnOrSuperColumn const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { -+ void get(thrift_std::function<void(ColumnOrSuperColumn const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { - return get_slice([cob = std::move(cob), &column_path](auto&& results) { - if (results.empty()) { - throw NotFoundException(); -@@ -251,7 +257,7 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, key, column_path_to_column_parent(column_path), column_path_to_slice_predicate(column_path), std::move(consistency_level)); - } - -- void get_slice(tcxx::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void get_slice(thrift_std::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - return multiget_slice([cob = std::move(cob)](auto&& results) { - if (!results.empty()) { - return cob(std::move(results.begin()->second)); -@@ -260,7 +266,7 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, {key}, column_parent, predicate, consistency_level); - } - -- void get_count(tcxx::function<void(int32_t const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void get_count(thrift_std::function<void(int32_t const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - return multiget_count([cob = std::move(cob)](auto&& results) { - if (!results.empty()) { - return cob(results.begin()->second); -@@ -269,7 +275,7 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, {key}, column_parent, predicate, consistency_level); - } - -- void multiget_slice(tcxx::function<void(std::map<std::string, std::vector<ColumnOrSuperColumn> > const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void multiget_slice(thrift_std::function<void(std::map<std::string, std::vector<ColumnOrSuperColumn> > const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (!column_parent.super_column.empty()) { - fail(unimplemented::cause::SUPER); -@@ -297,7 +303,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void multiget_count(tcxx::function<void(std::map<std::string, int32_t> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void multiget_count(thrift_std::function<void(std::map<std::string, int32_t> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (!column_parent.super_column.empty()) { - fail(unimplemented::cause::SUPER); -@@ -326,7 +332,7 @@ class thrift_handler : public CassandraCobSvIf { - * don't know which partition keys in the specified range we should return back to the client. So for - * now our behavior differs from Origin. - */ -- void get_range_slices(tcxx::function<void(std::vector<KeySlice> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level) { -+ void get_range_slices(thrift_std::function<void(std::vector<KeySlice> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (!column_parent.super_column.empty()) { - fail(unimplemented::cause::SUPER); -@@ -437,7 +443,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void get_paged_slice(tcxx::function<void(std::vector<KeySlice> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family, const KeyRange& range, const std::string& start_column, const ConsistencyLevel::type consistency_level) { -+ void get_paged_slice(thrift_std::function<void(std::vector<KeySlice> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family, const KeyRange& range, const std::string& start_column, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_family, [&](schema_ptr schema) { - return do_with(std::vector<KeySlice>(), [&](auto& output) { - if (range.__isset.row_filter) { -@@ -465,14 +471,14 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void get_indexed_slices(tcxx::function<void(std::vector<KeySlice> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level) { -+ void get_indexed_slices(thrift_std::function<void(std::vector<KeySlice> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level) { - std::vector<KeySlice> _return; - warn(unimplemented::cause::INDEXES); - // FIXME: implement - return pass_unimplemented(exn_cob); - } - -- void insert(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level) { -+ void insert(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (column_parent.__isset.super_column) { - fail(unimplemented::cause::SUPER); -@@ -491,7 +497,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void add(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level) { -+ void add(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (column_parent.__isset.super_column) { - fail(unimplemented::cause::SUPER); -@@ -506,14 +512,14 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void cas(tcxx::function<void(CASResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const std::string& column_family, const std::vector<Column> & expected, const std::vector<Column> & updates, const ConsistencyLevel::type serial_consistency_level, const ConsistencyLevel::type commit_consistency_level) { -+ void cas(thrift_std::function<void(CASResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const std::string& column_family, const std::vector<Column> & expected, const std::vector<Column> & updates, const ConsistencyLevel::type serial_consistency_level, const ConsistencyLevel::type commit_consistency_level) { - CASResult _return; - warn(unimplemented::cause::LWT); - // FIXME: implement - return pass_unimplemented(exn_cob); - } - -- void remove(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level) { -+ void remove(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_path.column_family, [&](schema_ptr schema) { - if (schema->is_view()) { - throw make_exception<InvalidRequestException>("Cannot modify Materialized Views directly"); -@@ -541,7 +547,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void remove_counter(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { -+ void remove_counter(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_path.column_family, [&](schema_ptr schema) { - mutation m_to_apply(schema, key_from_thrift(*schema, to_bytes_view(key))); - -@@ -567,7 +573,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void batch_mutate(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { -+ void batch_mutate(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto p = prepare_mutations(_db.local(), current_keyspace(), mutation_map); - return parallel_for_each(std::move(p.second), [this](auto&& schema) { -@@ -579,7 +585,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void atomic_batch_mutate(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { -+ void atomic_batch_mutate(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto p = prepare_mutations(_db.local(), current_keyspace(), mutation_map); - return parallel_for_each(std::move(p.second), [this](auto&& schema) { -@@ -591,7 +597,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void truncate(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfname) { -+ void truncate(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfname) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - if (current_keyspace().empty()) { - throw make_exception<InvalidRequestException>("keyspace not set"); -@@ -606,7 +612,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void get_multi_slice(tcxx::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const MultiSliceRequest& request) { -+ void get_multi_slice(thrift_std::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const MultiSliceRequest& request) { - with_schema(std::move(cob), std::move(exn_cob), request.column_parent.column_family, [&](schema_ptr schema) { - if (!request.__isset.key) { - throw make_exception<InvalidRequestException>("Key may not be empty"); -@@ -673,7 +679,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_schema_versions(tcxx::function<void(std::map<std::string, std::vector<std::string> > const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { -+ void describe_schema_versions(thrift_std::function<void(std::map<std::string, std::vector<std::string> > const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { - with_cob(std::move(cob), std::move(exn_cob), [] { - return service::get_local_storage_service().describe_schema_versions().then([](auto&& m) { - std::map<std::string, std::vector<std::string>> ret; -@@ -685,7 +691,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_keyspaces(tcxx::function<void(std::vector<KsDef> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { -+ void describe_keyspaces(thrift_std::function<void(std::vector<KsDef> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - validate_login(); - std::vector<KsDef> ret; -@@ -696,15 +702,15 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_cluster_name(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_cluster_name(thrift_std::function<void(std::string const& _return)> cob) { - cob(_db.local().get_config().cluster_name()); - } - -- void describe_version(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_version(thrift_std::function<void(std::string const& _return)> cob) { - cob(::cassandra::thrift_version); - } - -- void do_describe_ring(tcxx::function<void(std::vector<TokenRange> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace, bool local) { -+ void do_describe_ring(thrift_std::function<void(std::vector<TokenRange> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace, bool local) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto& ks = _db.local().find_keyspace(keyspace); - if (ks.get_replication_strategy().get_type() == locator::replication_strategy_type::local) { -@@ -735,15 +741,15 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_ring(tcxx::function<void(std::vector<TokenRange> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void describe_ring(thrift_std::function<void(std::vector<TokenRange> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - do_describe_ring(std::move(cob), std::move(exn_cob), keyspace, false); - } - -- void describe_local_ring(tcxx::function<void(std::vector<TokenRange> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void describe_local_ring(thrift_std::function<void(std::vector<TokenRange> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - do_describe_ring(std::move(cob), std::move(exn_cob), keyspace, true); - } - -- void describe_token_map(tcxx::function<void(std::map<std::string, std::string> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { -+ void describe_token_map(thrift_std::function<void(std::map<std::string, std::string> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { - with_cob(std::move(cob), std::move(exn_cob), [] { - auto m = service::get_local_storage_service().get_token_to_endpoint_map(); - std::map<std::string, std::string> ret; -@@ -754,15 +760,15 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_partitioner(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_partitioner(thrift_std::function<void(std::string const& _return)> cob) { - cob(dht::global_partitioner().name()); - } - -- void describe_snitch(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_snitch(thrift_std::function<void(std::string const& _return)> cob) { - cob(sprint("org.apache.cassandra.locator.%s", _db.local().get_snitch_name())); - } - -- void describe_keyspace(tcxx::function<void(KsDef const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void describe_keyspace(thrift_std::function<void(KsDef const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - validate_login(); - auto& ks = _db.local().find_keyspace(keyspace); -@@ -770,7 +776,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_splits(tcxx::function<void(std::vector<std::string> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { -+ void describe_splits(thrift_std::function<void(std::vector<std::string> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { - return describe_splits_ex([cob = std::move(cob)](auto&& results) { - std::vector<std::string> res; - res.reserve(results.size() + 1); -@@ -782,13 +788,13 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, cfName, start_token, end_token, keys_per_split); - } - -- void trace_next_query(tcxx::function<void(std::string const& _return)> cob) { -+ void trace_next_query(thrift_std::function<void(std::string const& _return)> cob) { - std::string _return; - // FIXME: implement - return cob("dummy trace"); - } - -- void describe_splits_ex(tcxx::function<void(std::vector<CfSplit> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { -+ void describe_splits_ex(thrift_std::function<void(std::vector<CfSplit> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { - with_cob(std::move(cob), std::move(exn_cob), [&]{ - dht::token_range_vector ranges; - auto tstart = start_token.empty() ? dht::minimum_token() : dht::global_partitioner().from_sstring(sstring(start_token)); -@@ -811,7 +817,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_add_column_family(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { -+ void system_add_column_family(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - if (!_db.local().has_keyspace(cf_def.keyspace)) { - throw NotFoundException(); -@@ -828,7 +834,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - }); - } -- void system_drop_column_family(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family) { -+ void system_drop_column_family(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - return _query_state.get_client_state().has_column_family_access(current_keyspace(), column_family, auth::permission::DROP).then([=] { - auto& cf = _db.local().find_column_family(current_keyspace(), column_family); -@@ -845,7 +851,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_add_keyspace(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { -+ void system_add_keyspace(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto ksm = keyspace_from_thrift(ks_def); - return _query_state.get_client_state().has_all_keyspaces_access(auth::permission::CREATE).then([this, ksm = std::move(ksm)] { -@@ -856,7 +862,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_drop_keyspace(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void system_drop_keyspace(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - thrift_validation::validate_keyspace_not_system(keyspace); - if (!_db.local().has_keyspace(keyspace)) { -@@ -871,7 +877,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_update_keyspace(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { -+ void system_update_keyspace(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - thrift_validation::validate_keyspace_not_system(ks_def.name); - -@@ -891,7 +897,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_update_column_family(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { -+ void system_update_column_family(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto& cf = _db.local().find_column_family(cf_def.keyspace, cf_def.name); - auto schema = cf.schema(); -@@ -922,7 +928,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void execute_cql_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { -+ void execute_cql_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { - throw make_exception<InvalidRequestException>("CQL2 is not supported"); - } - -@@ -952,7 +958,7 @@ class thrift_handler : public CassandraCobSvIf { - } - }; - -- void execute_cql3_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression, const ConsistencyLevel::type consistency) { -+ void execute_cql3_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression, const ConsistencyLevel::type consistency) { - with_exn_cob(std::move(exn_cob), [&] { - if (compression != Compression::type::NONE) { - throw make_exception<InvalidRequestException>("Compressed query strings are not supported"); -@@ -968,7 +974,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void prepare_cql_query(tcxx::function<void(CqlPreparedResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { -+ void prepare_cql_query(thrift_std::function<void(CqlPreparedResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { - throw make_exception<InvalidRequestException>("CQL2 is not supported"); - } - -@@ -996,7 +1002,7 @@ class thrift_handler : public CassandraCobSvIf { - } - }; - -- void prepare_cql3_query(tcxx::function<void(CqlPreparedResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { -+ void prepare_cql3_query(thrift_std::function<void(CqlPreparedResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { - with_exn_cob(std::move(exn_cob), [&] { - validate_login(); - if (compression != Compression::type::NONE) { -@@ -1010,11 +1016,11 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void execute_prepared_cql_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values) { -+ void execute_prepared_cql_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values) { - throw make_exception<InvalidRequestException>("CQL2 is not supported"); - } - -- void execute_prepared_cql3_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values, const ConsistencyLevel::type consistency) { -+ void execute_prepared_cql3_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values, const ConsistencyLevel::type consistency) { - with_exn_cob(std::move(exn_cob), [&] { - cql3::prepared_cache_key_type cache_key(itemId); - bool needs_authorization = false; -@@ -1047,7 +1053,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void set_cql_version(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& version) { -+ void set_cql_version(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& version) { - // No-op. - cob(); - } -@@ -1122,7 +1128,7 @@ class thrift_handler : public CassandraCobSvIf { - if (cell) { - c.__set_value(bytes_to_string(*cell)); - } -- -+ - } - void end_row() { - CqlRow& r = _rows.emplace_back(); -diff --git a/thrift/server.cc b/thrift/server.cc -index 3ca500c90..0fee12e3d 100644 ---- a/thrift/server.cc -+++ b/thrift/server.cc -@@ -40,7 +40,14 @@ - #include <limits> - #include <cctype> - #include <vector> -+ -+#ifdef THRIFT_USES_BOOST - #include <boost/make_shared.hpp> -+namespace thrift_std = boost; -+#else -+#include <memory> -+namespace thrift_std = std; -+#endif - - static logging::logger tlogger("thrift"); - -@@ -96,9 +103,9 @@ struct thrift_server::connection::fake_transport : TTransport { - thrift_server::connection::connection(thrift_server& server, connected_socket&& fd, socket_address addr) - : _server(server), _fd(std::move(fd)), _read_buf(_fd.input()) - , _write_buf(_fd.output()) -- , _transport(boost::make_shared<thrift_server::connection::fake_transport>(this)) -- , _input(boost::make_shared<TMemoryBuffer>()) -- , _output(boost::make_shared<TMemoryBuffer>()) -+ , _transport(thrift_std::make_shared<thrift_server::connection::fake_transport>(this)) -+ , _input(thrift_std::make_shared<TMemoryBuffer>()) -+ , _output(thrift_std::make_shared<TMemoryBuffer>()) - , _in_proto(_server._protocol_factory->getProtocol(_input)) - , _out_proto(_server._protocol_factory->getProtocol(_output)) - , _processor(_server._processor_factory->getProcessor({ _in_proto, _out_proto, _transport })) { -diff --git a/thrift/server.hh b/thrift/server.hh -index cf713756a..e9c169819 100644 ---- a/thrift/server.hh -+++ b/thrift/server.hh -@@ -31,6 +31,12 @@ - #include <cstdint> - #include <boost/intrusive/list.hpp> - -+#ifdef THRIFT_USES_BOOST -+namespace thrift_std = boost; -+#else -+namespace thrift_std = std; -+#endif -+ - class thrift_server; - class thrift_stats; - class database; -@@ -80,12 +86,12 @@ class thrift_server { - input_stream<char> _read_buf; - output_stream<char> _write_buf; - temporary_buffer<char> _in_tmp; -- boost::shared_ptr<fake_transport> _transport; -- boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> _input; -- boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> _output; -- boost::shared_ptr<apache::thrift::protocol::TProtocol> _in_proto; -- boost::shared_ptr<apache::thrift::protocol::TProtocol> _out_proto; -- boost::shared_ptr<apache::thrift::async::TAsyncProcessor> _processor; -+ thrift_std::shared_ptr<fake_transport> _transport; -+ thrift_std::shared_ptr<apache::thrift::transport::TMemoryBuffer> _input; -+ thrift_std::shared_ptr<apache::thrift::transport::TMemoryBuffer> _output; -+ thrift_std::shared_ptr<apache::thrift::protocol::TProtocol> _in_proto; -+ thrift_std::shared_ptr<apache::thrift::protocol::TProtocol> _out_proto; -+ thrift_std::shared_ptr<apache::thrift::async::TAsyncProcessor> _processor; - promise<> _processor_promise; - public: - connection(thrift_server& server, connected_socket&& fd, socket_address addr); -@@ -101,9 +107,9 @@ class thrift_server { - private: - std::vector<server_socket> _listeners; - std::unique_ptr<thrift_stats> _stats; -- boost::shared_ptr<::cassandra::CassandraCobSvIfFactory> _handler_factory; -+ thrift_std::shared_ptr<::cassandra::CassandraCobSvIfFactory> _handler_factory; - std::unique_ptr<apache::thrift::protocol::TProtocolFactory> _protocol_factory; -- boost::shared_ptr<apache::thrift::async::TAsyncProcessorFactory> _processor_factory; -+ thrift_std::shared_ptr<apache::thrift::async::TAsyncProcessorFactory> _processor_factory; - uint64_t _total_connections = 0; - uint64_t _current_connections = 0; - uint64_t _requests_served = 0; diff --git a/dev-db/scylla/files/10-scylla.conf b/dev-db/scylla/files/10-scylla.conf deleted file mode 100644 index 48cfe7c..0000000 --- a/dev-db/scylla/files/10-scylla.conf +++ /dev/null @@ -1,2 +0,0 @@ -:syslogtag, startswith, "scylla" /var/log/scylla/scylla.log -& ~ diff --git a/dev-db/scylla/files/3.1-revert-64-bit-gc_clock.patch b/dev-db/scylla/files/3.1-revert-64-bit-gc_clock.patch deleted file mode 100644 index ca3c105..0000000 --- a/dev-db/scylla/files/3.1-revert-64-bit-gc_clock.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/gc_clock.hh b/gc_clock.hh -index ac3cbeb95..0e2ef5548 100644 ---- a/gc_clock.hh -+++ b/gc_clock.hh -@@ -32,7 +32,7 @@ - class gc_clock final { - public: - using base = seastar::lowres_system_clock; -- using rep = int64_t; -+ using rep = int32_t; - using period = std::ratio<1, 1>; // seconds - using duration = std::chrono::duration<rep, period>; - using time_point = std::chrono::time_point<gc_clock, duration>; -diff --git a/sstables/mc/writer.cc b/sstables/mc/writer.cc -index d36789899..717766d8e 100644 ---- a/sstables/mc/writer.cc -+++ b/sstables/mc/writer.cc -@@ -335,7 +335,7 @@ void write_delta_ttl(W& out, gc_clock::duration ttl, const encoding_stats& enc_s - template <typename W> - GCC6_CONCEPT(requires Writer<W>()) - void write_delta_local_deletion_time(W& out, int64_t local_deletion_time, const encoding_stats& enc_stats) { -- write_unsigned_delta_vint(out, local_deletion_time, enc_stats.min_local_deletion_time.time_since_epoch().count()); -+ write_unsigned_delta_vint(out, local_deletion_time, (int64_t)enc_stats.min_local_deletion_time.time_since_epoch().count()); - } - - template <typename W> diff --git a/dev-db/scylla/files/3.1-thrift-support.patch b/dev-db/scylla/files/3.1-thrift-support.patch deleted file mode 100644 index 95a841c..0000000 --- a/dev-db/scylla/files/3.1-thrift-support.patch +++ /dev/null @@ -1,543 +0,0 @@ -diff --git a/configure.py b/configure.py -index b59f7abe6..2e26461fa 100755 ---- a/configure.py -+++ b/configure.py -@@ -1123,6 +1123,12 @@ if not os.path.exists(xxhash_dir) or not os.listdir(xxhash_dir): - if not args.staticboost: - args.user_cflags += ' -DBOOST_TEST_DYN_LINK' - -+# thrift version detection, see #4538 -+thrift_version = subprocess.check_output(["thrift", "-version"]).decode("utf-8").split(" ")[-1] -+if int(thrift_version.replace(".", "")) < 110: -+ print('Note: thrift version < 0.11.0 detected, using boost symbols') -+ args.user_cflags += ' -DTHRIFT_USES_BOOST' -+ - for pkg in pkgs: - args.user_cflags += ' ' + pkg_config(pkg, '--cflags') - libs += ' ' + pkg_config(pkg, '--libs') -diff --git a/thrift/handler.cc b/thrift/handler.cc -index 540cc9cbc..f3725e3d3 100644 ---- a/thrift/handler.cc -+++ b/thrift/handler.cc -@@ -55,6 +55,12 @@ - #include "thrift/server.hh" - #include "db/config.hh" - -+#ifdef THRIFT_USES_BOOST -+namespace thrift_std = tcxx; -+#else -+namespace thrift_std = std; -+#endif -+ - using namespace ::apache::thrift; - using namespace ::apache::thrift::protocol; - namespace thrift_transport = ::apache::thrift::transport; -@@ -69,7 +75,7 @@ class unimplemented_exception : public std::exception { - virtual const char* what() const throw () override { return "sorry, not implemented"; } - }; - --void pass_unimplemented(const tcxx::function<void(::apache::thrift::TDelayedException* _throw)>& exn_cob) { -+void pass_unimplemented(const thrift_std::function<void(::apache::thrift::TDelayedException* _throw)>& exn_cob) { - exn_cob(::apache::thrift::TDelayedException::delayException(unimplemented_exception())); - } - -@@ -119,8 +125,8 @@ class delayed_exception_wrapper : public ::apache::thrift::TDelayedException { - - template <typename Func, typename T> - void --with_cob(tcxx::function<void (const T& ret)>&& cob, -- tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, -+with_cob(thrift_std::function<void (const T& ret)>&& cob, -+ thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, - Func&& func) { - // then_wrapped() terminates the fiber by calling one of the cob objects - futurize<noexcept_movable_t<T>>::apply([func = std::forward<Func>(func)] { -@@ -137,8 +143,8 @@ with_cob(tcxx::function<void (const T& ret)>&& cob, - - template <typename Func> - void --with_cob(tcxx::function<void ()>&& cob, -- tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, -+with_cob(thrift_std::function<void ()>&& cob, -+ thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, - Func&& func) { - // then_wrapped() terminates the fiber by calling one of the cob objects - futurize<void>::apply(func).then_wrapped([cob = std::move(cob), exn_cob = std::move(exn_cob)] (future<> f) { -@@ -154,7 +160,7 @@ with_cob(tcxx::function<void ()>&& cob, - - template <typename Func> - void --with_exn_cob(tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, Func&& func) { -+with_exn_cob(thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, Func&& func) { - // then_wrapped() terminates the fiber by calling one of the cob objects - futurize<void>::apply(func).then_wrapped([exn_cob = std::move(exn_cob)] (future<> f) { - try { -@@ -203,7 +209,7 @@ class thrift_handler : public CassandraCobSvIf { - template <typename Cob, typename Func> - void - with_schema(Cob&& cob, -- tcxx::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, -+ thrift_std::function<void (::apache::thrift::TDelayedException* _throw)>&& exn_cob, - const std::string& cf, - Func&& func) { - with_cob(std::move(cob), std::move(exn_cob), [this, &cf, func = std::move(func)] { -@@ -227,7 +233,7 @@ class thrift_handler : public CassandraCobSvIf { - return _query_state.get_client_state().validate_login(); - }; - -- void login(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const AuthenticationRequest& auth_request) { -+ void login(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const AuthenticationRequest& auth_request) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auth::authenticator::credentials_map creds(auth_request.credentials.begin(), auth_request.credentials.end()); - auto& auth_service = *_query_state.get_client_state().get_auth_service(); -@@ -237,13 +243,13 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void set_keyspace(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void set_keyspace(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - _query_state.get_client_state().set_keyspace(_db.local(), keyspace); - }); - } - -- void get(tcxx::function<void(ColumnOrSuperColumn const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { -+ void get(thrift_std::function<void(ColumnOrSuperColumn const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { - return get_slice([cob = std::move(cob), &column_path](auto&& results) { - if (results.empty()) { - throw NotFoundException(); -@@ -252,7 +258,7 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, key, column_path_to_column_parent(column_path), column_path_to_slice_predicate(column_path), std::move(consistency_level)); - } - -- void get_slice(tcxx::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void get_slice(thrift_std::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - return multiget_slice([cob = std::move(cob)](auto&& results) { - if (!results.empty()) { - return cob(std::move(results.begin()->second)); -@@ -261,7 +267,7 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, {key}, column_parent, predicate, consistency_level); - } - -- void get_count(tcxx::function<void(int32_t const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void get_count(thrift_std::function<void(int32_t const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - return multiget_count([cob = std::move(cob)](auto&& results) { - if (!results.empty()) { - return cob(results.begin()->second); -@@ -270,7 +276,7 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, {key}, column_parent, predicate, consistency_level); - } - -- void multiget_slice(tcxx::function<void(std::map<std::string, std::vector<ColumnOrSuperColumn> > const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void multiget_slice(thrift_std::function<void(std::map<std::string, std::vector<ColumnOrSuperColumn> > const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (!column_parent.super_column.empty()) { - fail(unimplemented::cause::SUPER); -@@ -298,7 +304,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void multiget_count(tcxx::function<void(std::map<std::string, int32_t> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { -+ void multiget_count(thrift_std::function<void(std::map<std::string, int32_t> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::vector<std::string> & keys, const ColumnParent& column_parent, const SlicePredicate& predicate, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (!column_parent.super_column.empty()) { - fail(unimplemented::cause::SUPER); -@@ -327,7 +333,7 @@ class thrift_handler : public CassandraCobSvIf { - * don't know which partition keys in the specified range we should return back to the client. So for - * now our behavior differs from Origin. - */ -- void get_range_slices(tcxx::function<void(std::vector<KeySlice> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level) { -+ void get_range_slices(thrift_std::function<void(std::vector<KeySlice> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const SlicePredicate& predicate, const KeyRange& range, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (!column_parent.super_column.empty()) { - fail(unimplemented::cause::SUPER); -@@ -438,7 +444,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void get_paged_slice(tcxx::function<void(std::vector<KeySlice> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family, const KeyRange& range, const std::string& start_column, const ConsistencyLevel::type consistency_level) { -+ void get_paged_slice(thrift_std::function<void(std::vector<KeySlice> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family, const KeyRange& range, const std::string& start_column, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_family, [&](schema_ptr schema) { - return do_with(std::vector<KeySlice>(), [&](auto& output) { - if (range.__isset.row_filter) { -@@ -466,14 +472,14 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void get_indexed_slices(tcxx::function<void(std::vector<KeySlice> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level) { -+ void get_indexed_slices(thrift_std::function<void(std::vector<KeySlice> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const ColumnParent& column_parent, const IndexClause& index_clause, const SlicePredicate& column_predicate, const ConsistencyLevel::type consistency_level) { - std::vector<KeySlice> _return; - warn(unimplemented::cause::INDEXES); - // FIXME: implement - return pass_unimplemented(exn_cob); - } - -- void insert(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level) { -+ void insert(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const Column& column, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (column_parent.__isset.super_column) { - fail(unimplemented::cause::SUPER); -@@ -492,7 +498,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void add(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level) { -+ void add(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnParent& column_parent, const CounterColumn& column, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_parent.column_family, [&](schema_ptr schema) { - if (column_parent.__isset.super_column) { - fail(unimplemented::cause::SUPER); -@@ -507,14 +513,14 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void cas(tcxx::function<void(CASResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const std::string& column_family, const std::vector<Column> & expected, const std::vector<Column> & updates, const ConsistencyLevel::type serial_consistency_level, const ConsistencyLevel::type commit_consistency_level) { -+ void cas(thrift_std::function<void(CASResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const std::string& column_family, const std::vector<Column> & expected, const std::vector<Column> & updates, const ConsistencyLevel::type serial_consistency_level, const ConsistencyLevel::type commit_consistency_level) { - CASResult _return; - warn(unimplemented::cause::LWT); - // FIXME: implement - return pass_unimplemented(exn_cob); - } - -- void remove(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level) { -+ void remove(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const int64_t timestamp, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_path.column_family, [&](schema_ptr schema) { - if (schema->is_view()) { - throw make_exception<InvalidRequestException>("Cannot modify Materialized Views directly"); -@@ -542,7 +548,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void remove_counter(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { -+ void remove_counter(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& key, const ColumnPath& column_path, const ConsistencyLevel::type consistency_level) { - with_schema(std::move(cob), std::move(exn_cob), column_path.column_family, [&](schema_ptr schema) { - mutation m_to_apply(schema, key_from_thrift(*schema, to_bytes_view(key))); - -@@ -568,7 +574,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void batch_mutate(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { -+ void batch_mutate(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto p = prepare_mutations(_db.local(), current_keyspace(), mutation_map); - return parallel_for_each(std::move(p.second), [this](auto&& schema) { -@@ -580,7 +586,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void atomic_batch_mutate(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { -+ void atomic_batch_mutate(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::map<std::string, std::map<std::string, std::vector<Mutation> > > & mutation_map, const ConsistencyLevel::type consistency_level) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto p = prepare_mutations(_db.local(), current_keyspace(), mutation_map); - return parallel_for_each(std::move(p.second), [this](auto&& schema) { -@@ -592,7 +598,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void truncate(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfname) { -+ void truncate(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfname) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - if (current_keyspace().empty()) { - throw make_exception<InvalidRequestException>("keyspace not set"); -@@ -607,7 +613,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void get_multi_slice(tcxx::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const MultiSliceRequest& request) { -+ void get_multi_slice(thrift_std::function<void(std::vector<ColumnOrSuperColumn> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const MultiSliceRequest& request) { - with_schema(std::move(cob), std::move(exn_cob), request.column_parent.column_family, [&](schema_ptr schema) { - if (!request.__isset.key) { - throw make_exception<InvalidRequestException>("Key may not be empty"); -@@ -674,7 +680,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_schema_versions(tcxx::function<void(std::map<std::string, std::vector<std::string> > const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { -+ void describe_schema_versions(thrift_std::function<void(std::map<std::string, std::vector<std::string> > const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { - with_cob(std::move(cob), std::move(exn_cob), [] { - return service::get_local_storage_service().describe_schema_versions().then([](auto&& m) { - std::map<std::string, std::vector<std::string>> ret; -@@ -686,7 +692,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_keyspaces(tcxx::function<void(std::vector<KsDef> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { -+ void describe_keyspaces(thrift_std::function<void(std::vector<KsDef> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - validate_login(); - std::vector<KsDef> ret; -@@ -697,15 +703,15 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_cluster_name(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_cluster_name(thrift_std::function<void(std::string const& _return)> cob) { - cob(_db.local().get_config().cluster_name()); - } - -- void describe_version(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_version(thrift_std::function<void(std::string const& _return)> cob) { - cob(::cassandra::thrift_version); - } - -- void do_describe_ring(tcxx::function<void(std::vector<TokenRange> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace, bool local) { -+ void do_describe_ring(thrift_std::function<void(std::vector<TokenRange> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace, bool local) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto& ks = _db.local().find_keyspace(keyspace); - if (ks.get_replication_strategy().get_type() == locator::replication_strategy_type::local) { -@@ -736,15 +742,15 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_ring(tcxx::function<void(std::vector<TokenRange> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void describe_ring(thrift_std::function<void(std::vector<TokenRange> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - do_describe_ring(std::move(cob), std::move(exn_cob), keyspace, false); - } - -- void describe_local_ring(tcxx::function<void(std::vector<TokenRange> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void describe_local_ring(thrift_std::function<void(std::vector<TokenRange> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - do_describe_ring(std::move(cob), std::move(exn_cob), keyspace, true); - } - -- void describe_token_map(tcxx::function<void(std::map<std::string, std::string> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { -+ void describe_token_map(thrift_std::function<void(std::map<std::string, std::string> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob) { - with_cob(std::move(cob), std::move(exn_cob), [] { - auto m = service::get_local_storage_service().get_token_to_endpoint_map(); - std::map<std::string, std::string> ret; -@@ -755,15 +761,15 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_partitioner(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_partitioner(thrift_std::function<void(std::string const& _return)> cob) { - cob(dht::global_partitioner().name()); - } - -- void describe_snitch(tcxx::function<void(std::string const& _return)> cob) { -+ void describe_snitch(thrift_std::function<void(std::string const& _return)> cob) { - cob(format("org.apache.cassandra.locator.{}", _db.local().get_snitch_name())); - } - -- void describe_keyspace(tcxx::function<void(KsDef const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void describe_keyspace(thrift_std::function<void(KsDef const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - validate_login(); - auto& ks = _db.local().find_keyspace(keyspace); -@@ -771,7 +777,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void describe_splits(tcxx::function<void(std::vector<std::string> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { -+ void describe_splits(thrift_std::function<void(std::vector<std::string> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { - return describe_splits_ex([cob = std::move(cob)](auto&& results) { - std::vector<std::string> res; - res.reserve(results.size() + 1); -@@ -783,13 +789,13 @@ class thrift_handler : public CassandraCobSvIf { - }, exn_cob, cfName, start_token, end_token, keys_per_split); - } - -- void trace_next_query(tcxx::function<void(std::string const& _return)> cob) { -+ void trace_next_query(thrift_std::function<void(std::string const& _return)> cob) { - std::string _return; - // FIXME: implement - return cob("dummy trace"); - } - -- void describe_splits_ex(tcxx::function<void(std::vector<CfSplit> const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { -+ void describe_splits_ex(thrift_std::function<void(std::vector<CfSplit> const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& cfName, const std::string& start_token, const std::string& end_token, const int32_t keys_per_split) { - with_cob(std::move(cob), std::move(exn_cob), [&]{ - dht::token_range_vector ranges; - auto tstart = start_token.empty() ? dht::minimum_token() : dht::global_partitioner().from_sstring(sstring(start_token)); -@@ -812,7 +818,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_add_column_family(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { -+ void system_add_column_family(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - if (!_db.local().has_keyspace(cf_def.keyspace)) { - throw NotFoundException(); -@@ -829,7 +835,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - }); - } -- void system_drop_column_family(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family) { -+ void system_drop_column_family(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& column_family) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - return _query_state.get_client_state().has_column_family_access(current_keyspace(), column_family, auth::permission::DROP).then([=] { - auto& cf = _db.local().find_column_family(current_keyspace(), column_family); -@@ -846,7 +852,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_add_keyspace(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { -+ void system_add_keyspace(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto ksm = keyspace_from_thrift(ks_def); - return _query_state.get_client_state().has_all_keyspaces_access(auth::permission::CREATE).then([this, ksm = std::move(ksm)] { -@@ -857,7 +863,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_drop_keyspace(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { -+ void system_drop_keyspace(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& keyspace) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - thrift_validation::validate_keyspace_not_system(keyspace); - if (!_db.local().has_keyspace(keyspace)) { -@@ -872,7 +878,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_update_keyspace(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { -+ void system_update_keyspace(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const KsDef& ks_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - thrift_validation::validate_keyspace_not_system(ks_def.name); - -@@ -892,7 +898,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void system_update_column_family(tcxx::function<void(std::string const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { -+ void system_update_column_family(thrift_std::function<void(std::string const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const CfDef& cf_def) { - with_cob(std::move(cob), std::move(exn_cob), [&] { - auto& cf = _db.local().find_column_family(cf_def.keyspace, cf_def.name); - auto schema = cf.schema(); -@@ -923,7 +929,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void execute_cql_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { -+ void execute_cql_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { - throw make_exception<InvalidRequestException>("CQL2 is not supported"); - } - -@@ -953,7 +959,7 @@ class thrift_handler : public CassandraCobSvIf { - } - }; - -- void execute_cql3_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression, const ConsistencyLevel::type consistency) { -+ void execute_cql3_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression, const ConsistencyLevel::type consistency) { - with_exn_cob(std::move(exn_cob), [&] { - if (compression != Compression::type::NONE) { - throw make_exception<InvalidRequestException>("Compressed query strings are not supported"); -@@ -969,7 +975,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void prepare_cql_query(tcxx::function<void(CqlPreparedResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { -+ void prepare_cql_query(thrift_std::function<void(CqlPreparedResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { - throw make_exception<InvalidRequestException>("CQL2 is not supported"); - } - -@@ -997,7 +1003,7 @@ class thrift_handler : public CassandraCobSvIf { - } - }; - -- void prepare_cql3_query(tcxx::function<void(CqlPreparedResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { -+ void prepare_cql3_query(thrift_std::function<void(CqlPreparedResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& query, const Compression::type compression) { - with_exn_cob(std::move(exn_cob), [&] { - validate_login(); - if (compression != Compression::type::NONE) { -@@ -1011,11 +1017,11 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void execute_prepared_cql_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values) { -+ void execute_prepared_cql_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values) { - throw make_exception<InvalidRequestException>("CQL2 is not supported"); - } - -- void execute_prepared_cql3_query(tcxx::function<void(CqlResult const& _return)> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values, const ConsistencyLevel::type consistency) { -+ void execute_prepared_cql3_query(thrift_std::function<void(CqlResult const& _return)> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const int32_t itemId, const std::vector<std::string> & values, const ConsistencyLevel::type consistency) { - with_exn_cob(std::move(exn_cob), [&] { - cql3::prepared_cache_key_type cache_key(itemId); - bool needs_authorization = false; -@@ -1048,7 +1054,7 @@ class thrift_handler : public CassandraCobSvIf { - }); - } - -- void set_cql_version(tcxx::function<void()> cob, tcxx::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& version) { -+ void set_cql_version(thrift_std::function<void()> cob, thrift_std::function<void(::apache::thrift::TDelayedException* _throw)> exn_cob, const std::string& version) { - // No-op. - cob(); - } -diff --git a/thrift/server.cc b/thrift/server.cc -index c41ab5c22..85d07e8ca 100644 ---- a/thrift/server.cc -+++ b/thrift/server.cc -@@ -41,7 +41,14 @@ - #include <limits> - #include <cctype> - #include <vector> -+ -+#ifdef THRIFT_USES_BOOST - #include <boost/make_shared.hpp> -+namespace thrift_std = boost; -+#else -+#include <memory> -+namespace thrift_std = std; -+#endif - - static logging::logger tlogger("thrift"); - -@@ -97,9 +104,9 @@ struct thrift_server::connection::fake_transport : TTransport { - thrift_server::connection::connection(thrift_server& server, connected_socket&& fd, socket_address addr) - : _server(server), _fd(std::move(fd)), _read_buf(_fd.input()) - , _write_buf(_fd.output()) -- , _transport(boost::make_shared<thrift_server::connection::fake_transport>(this)) -- , _input(boost::make_shared<TMemoryBuffer>()) -- , _output(boost::make_shared<TMemoryBuffer>()) -+ , _transport(thrift_std::make_shared<thrift_server::connection::fake_transport>(this)) -+ , _input(thrift_std::make_shared<TMemoryBuffer>()) -+ , _output(thrift_std::make_shared<TMemoryBuffer>()) - , _in_proto(_server._protocol_factory->getProtocol(_input)) - , _out_proto(_server._protocol_factory->getProtocol(_output)) - , _processor(_server._processor_factory->getProcessor({ _in_proto, _out_proto, _transport })) { -diff --git a/thrift/server.hh b/thrift/server.hh -index af37c4e60..2f4662178 100644 ---- a/thrift/server.hh -+++ b/thrift/server.hh -@@ -31,6 +31,12 @@ - #include <cstdint> - #include <boost/intrusive/list.hpp> - -+#ifdef THRIFT_USES_BOOST -+namespace thrift_std = boost; -+#else -+namespace thrift_std = std; -+#endif -+ - class thrift_server; - class thrift_stats; - class database; -@@ -80,12 +86,12 @@ class thrift_server { - input_stream<char> _read_buf; - output_stream<char> _write_buf; - temporary_buffer<char> _in_tmp; -- boost::shared_ptr<fake_transport> _transport; -- boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> _input; -- boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> _output; -- boost::shared_ptr<apache::thrift::protocol::TProtocol> _in_proto; -- boost::shared_ptr<apache::thrift::protocol::TProtocol> _out_proto; -- boost::shared_ptr<apache::thrift::async::TAsyncProcessor> _processor; -+ thrift_std::shared_ptr<fake_transport> _transport; -+ thrift_std::shared_ptr<apache::thrift::transport::TMemoryBuffer> _input; -+ thrift_std::shared_ptr<apache::thrift::transport::TMemoryBuffer> _output; -+ thrift_std::shared_ptr<apache::thrift::protocol::TProtocol> _in_proto; -+ thrift_std::shared_ptr<apache::thrift::protocol::TProtocol> _out_proto; -+ thrift_std::shared_ptr<apache::thrift::async::TAsyncProcessor> _processor; - promise<> _processor_promise; - public: - connection(thrift_server& server, connected_socket&& fd, socket_address addr); -@@ -101,9 +107,9 @@ class thrift_server { - private: - std::vector<server_socket> _listeners; - std::unique_ptr<thrift_stats> _stats; -- boost::shared_ptr<::cassandra::CassandraCobSvIfFactory> _handler_factory; -+ thrift_std::shared_ptr<::cassandra::CassandraCobSvIfFactory> _handler_factory; - std::unique_ptr<apache::thrift::protocol::TProtocolFactory> _protocol_factory; -- boost::shared_ptr<apache::thrift::async::TAsyncProcessorFactory> _processor_factory; -+ thrift_std::shared_ptr<apache::thrift::async::TAsyncProcessorFactory> _processor_factory; - uint64_t _total_connections = 0; - uint64_t _current_connections = 0; - uint64_t _requests_served = 0; diff --git a/dev-db/scylla/files/3.1.2-fix-read-amplification.patch b/dev-db/scylla/files/3.1.2-fix-read-amplification.patch deleted file mode 100644 index c0dceef..0000000 --- a/dev-db/scylla/files/3.1.2-fix-read-amplification.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/table.cc b/table.cc -index eec65689f2..596c312854 100644 ---- a/table.cc -+++ b/table.cc -@@ -2518,7 +2518,7 @@ future<row_locker::lock_holder> table::do_push_view_replica_updates(const schema - std::move(slice), - std::move(m), - [base, views = std::move(views), lock = std::move(lock), this, timeout, source = std::move(source), &io_priority] (auto& pk, auto& slice, auto& m) mutable { -- auto reader = source.make_reader(base, pk, slice, io_priority); -+ auto reader = source.make_reader(base, pk, slice, io_priority, nullptr, streamed_mutation::forwarding::no, mutation_reader::forwarding::no); - return this->generate_and_propagate_view_updates(base, std::move(views), std::move(m), std::move(reader)).then([lock = std::move(lock)] () mutable { - // return the local partition/row lock we have taken so it - // remains locked until the caller is done modifying this diff --git a/dev-db/scylla/files/boost-1.65.0-icl-ttp-matching.patch b/dev-db/scylla/files/boost-1.65.0-icl-ttp-matching.patch deleted file mode 100644 index f3c60a6..0000000 --- a/dev-db/scylla/files/boost-1.65.0-icl-ttp-matching.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 32178e147a976419b9ac846d3c40c3ab4d1e0ff6 Mon Sep 17 00:00:00 2001 -From: Mathias Gaunard <mathias@gaunard.com> -Date: Thu, 4 May 2017 17:18:22 +0100 -Subject: [PATCH] Compatibility with GCC 7.1 - -The libstdc++ shipped with GCC 7.1 uses a unary class template for std::string. -type_to_string needs to be adapted to deal with this properly. ---- - boost/icl/type_traits/type_to_string.hpp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/boost/icl/type_traits/type_to_string.hpp b/boost/icl/type_traits/type_to_string.hpp -index 80c473a..994711b 100644 ---- a/boost/icl/type_traits/type_to_string.hpp -+++ b/boost/icl/type_traits/type_to_string.hpp -@@ -43,7 +43,6 @@ namespace boost{ namespace icl - - template<>inline std::string type_to_string<float>::apply() { return "flt"; } - template<>inline std::string type_to_string<double>::apply() { return "dbl"; } -- template<>inline std::string type_to_string<std::string>::apply() { return "string"; } - - //------------------------------------------------------------------------- - template<template<class> class Templ> -@@ -78,6 +77,13 @@ namespace boost{ namespace icl - } - }; - -+ // --------------------------------------------------------------------------- -+ template<> -+ struct type_to_string<std::string> -+ { -+ static std::string apply() { return "string"; } -+ }; -+ - }} // namespace boost icl - - #endif diff --git a/dev-db/scylla/files/fix-fmt-3.5.0-compilation.patch b/dev-db/scylla/files/fix-fmt-3.5.0-compilation.patch deleted file mode 100644 index 4673e6a..0000000 --- a/dev-db/scylla/files/fix-fmt-3.5.0-compilation.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 5632c0776e5786c270b4c594ccb7cc3303e1648a Mon Sep 17 00:00:00 2001 -From: Vlad Zolotarov <vladz@scylladb.com> -Date: Tue, 16 Jul 2019 18:12:31 -0400 -Subject: [PATCH] tests: fix the compilation with fmt v5.3.0 - -Compilation fails with fmt release 5.3.0 when we print a bytes_view -using "{}" formatter. - -Compiler's complain is: "error: static assertion failed: mismatch -between char-types of context and argument" - -Fix this by explicitly using to_hex() converter. - -Signed-off-by: Vlad Zolotarov <vladz@scylladb.com> -Message-Id: <20190716221231.22605-3-vladz@scylladb.com> -Signed-off-by: Alexys Jacob <ultrabug@gentoo.org> ---- - tests/murmur_hash_test.cc | 2 +- - tests/sstable_3_x_test.cc | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/murmur_hash_test.cc b/tests/murmur_hash_test.cc -index fbe341479..d419cb3a9 100644 ---- a/tests/murmur_hash_test.cc -+++ b/tests/murmur_hash_test.cc -@@ -99,7 +99,7 @@ std::array<uint64_t,2> prefix_hashes[] = { - BOOST_AUTO_TEST_CASE(test_hash_output) { - auto assert_hashes_equal = [] (bytes_view data, std::array<uint64_t,2> lhs, std::array<uint64_t,2> rhs) { - if (lhs != rhs) { -- BOOST_FAIL(format("Hashes differ for {} (got {{0x{:x}, 0x{:x}}} and {{0x{:x}, 0x{:x}}})", data, -+ BOOST_FAIL(format("Hashes differ for {} (got {{0x{:x}, 0x{:x}}} and {{0x{:x}, 0x{:x}}})", to_hex(data), - lhs[0], lhs[1], rhs[0], rhs[1])); - } - }; -diff --git a/tests/sstable_3_x_test.cc b/tests/sstable_3_x_test.cc -index be77e7ecf..cc7756ddf 100644 ---- a/tests/sstable_3_x_test.cc -+++ b/tests/sstable_3_x_test.cc -@@ -2815,7 +2815,7 @@ SEASTAR_THREAD_TEST_CASE(test_uncompressed_collections_read) { - BOOST_FAIL(format("Expected row with column {} having value {}, but it has value {}", - def.id, - int32_type->decompose(int32_t(val[idx])), -- entry.first)); -+ to_hex(entry.first))); - } - ++idx; - } -@@ -2858,7 +2858,7 @@ SEASTAR_THREAD_TEST_CASE(test_uncompressed_collections_read) { - def.id, - int32_type->decompose(int32_t(val[idx].first)), - utf8_type->decompose(val[idx].second), -- entry.first, -+ to_hex(entry.first), - entry.second.value().linearize())); - } - ++idx; --- -2.22.0 - -From fe82437dea46f585758d388ba5d5ef8392cb0421 Mon Sep 17 00:00:00 2001 -From: Vlad Zolotarov <vladz@scylladb.com> -Date: Thu, 25 Apr 2019 15:34:15 -0400 -Subject: [PATCH] types.cc: fix the compilation with fmt v5.3.0 - -Compilation fails with fmt release 5.3.0 when we print a bytes_view -using "{}" formatter. - -Compiler's complain is: "error: static assertion failed: mismatch -between char-types of context and argument" - -Fix this by explicitly using to_hex() converter. - -Signed-off-by: Vlad Zolotarov <vladz@scylladb.com> -Signed-off-by: Alexys Jacob <ultrabug@gentoo.org> ---- - types.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/types.cc b/types.cc -index f6067c65c..bf0a9460a 100644 ---- a/types.cc -+++ b/types.cc -@@ -3212,7 +3212,7 @@ void list_type_impl::validate(bytes_view v, cql_serialization_format sf) const { - format("Validation failed for type {}: bytes remaining after reading all {} elements of the list -> [{}]", - this->name(), - nr, -- v)); -+ to_hex(v))); - } - } - --- -2.22.0 - diff --git a/dev-db/scylla/files/scylla-server.confd b/dev-db/scylla/files/scylla-server.confd deleted file mode 100644 index f210c1b..0000000 --- a/dev-db/scylla/files/scylla-server.confd +++ /dev/null @@ -1,17 +0,0 @@ -# please check the defaults of scylla in the /etc/default/scylla-server file! -# -# you can configure the following options for the OpenRC init script: -# - chdir -# - config_file -# - run_dir - -# source scylla default env -source /etc/default/scylla-server - -# source scylla additional configuration -for i in /etc/scylla.d/*.conf; do - if [ "$i" = "/etc/scylla.d/*.conf" ]; then - break - fi - . "$i" -done diff --git a/dev-db/scylla/files/scylla-server.initd b/dev-db/scylla/files/scylla-server.initd deleted file mode 100644 index f51b74f..0000000 --- a/dev-db/scylla/files/scylla-server.initd +++ /dev/null @@ -1,37 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -config_file=${config_file:-/etc/scylla/scylla.yaml} -run_dir=${run_dir:-/run/scylla} -chdir=${chdir:-/var/lib/scylla/coredump} - -command="/usr/bin/scylla" -command_args="--options-file ${config_file} ${CPUSET} ${DEV_MODE} ${SEASTAR_IO} ${SCYLLA_ARGS}" -command_background="true" -command_progress="true" -pidfile=${run_dir}/${SVCNAME}.pid -user=${USER:-scylla} -group=${GROUP:-scylla} -retry="SIGTERM/120" -start_stop_daemon_args="--chdir ${chdir} --user ${user} --group ${group} --wait 5000" - -depend() { - use net localmount logger -} - -start_pre() { - checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}" - if [ ! -f ${config_file} ]; then - eerror "Missing configuration file ${config_file}" - return 1 - fi - export SCYLLA_CONF SCYLLA_HOME - ebegin "Running scylla_prepare" - /usr/lib/scylla/scylla_prepare >/dev/null -} - -stop_post() { - ebegin "Running scylla_stop" - /usr/lib/scylla/scylla_stop >/dev/null -} diff --git a/dev-db/scylla/files/scylla.sudoers b/dev-db/scylla/files/scylla.sudoers deleted file mode 100644 index 62270ed..0000000 --- a/dev-db/scylla/files/scylla.sudoers +++ /dev/null @@ -1 +0,0 @@ -scylla ALL=(ALL) NOPASSWD: /usr/lib/scylla/scylla_prepare,/usr/lib/scylla/scylla_stop,/usr/lib/scylla/scylla_io_setup,/usr/lib/scylla/scylla-ami/scylla_ami_setup diff --git a/dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch b/dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch deleted file mode 100644 index f2cc16d..0000000 --- a/dev-db/scylla/files/v1-0001-repair-Add-a-timer-for-repair-reader.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 22af0a08b3fd7c9c29107095370f634d90f8afad Mon Sep 17 00:00:00 2001 -Message-Id: <22af0a08b3fd7c9c29107095370f634d90f8afad.1574845916.git.asias@scylladb.com> -From: Asias He <asias@scylladb.com> -Date: Wed, 27 Nov 2019 16:53:27 +0800 -Subject: [PATCH scylla v1] repair: Add a timer for repair reader -To: scylladb-dev@googlegroups.com - ---- - repair/row_level.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/repair/row_level.cc b/repair/row_level.cc -index ea0f7f2524..ec92c169b0 100644 ---- a/repair/row_level.cc -+++ b/repair/row_level.cc -@@ -339,7 +339,7 @@ using is_local_reader = bool_class<class is_local_reader_tag>; - public: - future<mutation_fragment_opt> - read_mutation_fragment() { -- return _reader(db::no_timeout); -+ return _reader(db::timeout_clock::now() + std::chrono::seconds(60 * 5)); - } - - lw_shared_ptr<const decorated_key_with_hash>& get_current_dk() { --- -2.23.0 - |