diff options
author | Ultrabug <ultrabug@gentoo.org> | 2019-06-13 17:09:29 +0200 |
---|---|---|
committer | Ultrabug <ultrabug@gentoo.org> | 2019-06-13 17:09:29 +0200 |
commit | 334bfd6da929dd727addd2bb8ff0b2d8f1881c24 (patch) | |
tree | 939fc8b1cff2ee3748e909d55b87958214fb3fee /dev-db/scylla | |
parent | app-admin/scylla-tools: version bump (diff) | |
download | ultrabug-334bfd6da929dd727addd2bb8ff0b2d8f1881c24.tar.gz ultrabug-334bfd6da929dd727addd2bb8ff0b2d8f1881c24.tar.bz2 ultrabug-334bfd6da929dd727addd2bb8ff0b2d8f1881c24.zip |
dev-db/scylla: version bump with pre-release LIKE support
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Manifest-Sign-Key: F30FAFEE3BD598228B24CB121A3A8C89C56D610B
Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'dev-db/scylla')
-rw-r--r-- | dev-db/scylla/Manifest | 32 | ||||
-rw-r--r-- | dev-db/scylla/files/0001-thrift-support-version-0.11-after-THRIFT-2221.patch | 552 | ||||
-rw-r--r-- | dev-db/scylla/scylla-3.0.7.ebuild | 300 | ||||
-rw-r--r-- | dev-db/scylla/scylla-9999.ebuild | 4 |
4 files changed, 872 insertions, 16 deletions
diff --git a/dev-db/scylla/Manifest b/dev-db/scylla/Manifest index 01e1133..adecd8c 100644 --- a/dev-db/scylla/Manifest +++ b/dev-db/scylla/Manifest @@ -1,6 +1,7 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX 0001-thrift-support-version-0.11-after-THRIFT-2221.patch 40277 BLAKE2B 4296b042320db3f3669f487961e58f75403d79fbdce06a4f04b3c9e83b243b637a513cf868c618fac26df82d20bfb7de44b51c959e09d299f6a1f72e54387761 SHA512 5403833a82972be26e5d50f0557cb7a4a2985dec487be3aeb907720b5a8f638d1e3c6bfd3d06bb0c097c707135f29b137f63e77d76ba918f009d179a27dc0c91 AUX 10-scylla.conf 64 BLAKE2B 31ce1b2173214bcac351b71cf19e5506ab08cefbca446ce23ad753c98c5e4fd7fbb89b0f79703ea4dcf1f6233e7929268365eeaab1b4e2e7b31553aa7928a969 SHA512 c24b3ec2f0ea3b1ad0792c05a8eb044b3a157862b59759e020586ae872f9789a558d423fe1dff1a8c6d8342049cf4d919faf31a1439a6a1c69af915365b4ec82 AUX boost-1.65.0-icl-ttp-matching.patch 1427 BLAKE2B de9c77253963656f85ed2d05babd600bc5b59b567bc889ed815dfba97f2a1334df48dbb1e67879dea1419fb439c513c54a66531d4e8ec28a7848385f70471334 SHA512 aaa7959df631c17a80486e5b6724d76bf2193694f5559443350c74567506f36c133f740adcbb1b2d3a5a2760730f498f0fd655ec6eff6d20393b6e49549c6ec8 AUX scylla-server.confd 386 BLAKE2B e075e8f5cac2ac373a43a637a4080fde5cbd402b5bef2a3865980f3f9d123366315d994ebf9abbd749167db6e1fa9c840295171add7c5507120be70020aaefa1 SHA512 5d3c55933a02d3b16837013b37110f6669c14e01599532f30935b5dc29871a5bed897c9eb01a6e89469eab7d645c9231745a06c2ef827f6700e13c8faa9cdb87 @@ -9,29 +10,32 @@ AUX scylla.sudoers 162 BLAKE2B 9aa0dce391da1f420a070d73d061452eeba60ad268f13a5bb DIST c-ares-fd6124c74da0801f23f9d324559d8b66fb83f533.tar.gz 1644001 BLAKE2B ee3f919dbb7de3f489a9027cf89b8db1dd36d9d5068e80f6e3851366c7a6fa532c67cf8ebf0d15e01b26a8ec5bb4e49e7844ec46b605f997fac1e961dcc436f1 SHA512 52b929e4d2615338d8ee4ce7c32f006f18e54ef2db9fbe2534c4e99cd3684d86661a6674d2659acb714592f439fac9c4f0ae6337d9d68c1ec3463d4d16572310 DIST fmt-f61e71ccb9ab253f6d76096b2d958caf38fcccaa.tar.gz 616708 BLAKE2B e71c4ff6d494490366e490307b83fb0619b29228e06650d3abb0a97797009cd6205c23af777a348622eb4c4a08203a0e41c5475ab95c437d0f0c382967e2491f SHA512 d234a58af428e238e559ceec1599ff449fbfbe4ecc212ed00c82ef3f057a3351a9eb59906d3b6f7efeec76188645a49376507d7a78dd68d61806cd63d0fbb3a0 DIST libdeflate-e7e54eab42d7fd3c684cfe8278084fc354a2455a.tar.gz 123934 BLAKE2B 430eba5f7f6b751d01964198d93ca3683c0131f41964b871c3c2872932f76f35d88dce4df1ac80b03f5719d618d0965097831fe8f12cb0bf0d8233129aad070b SHA512 7f63b71a2e29e6c5cbdb6d18c75122f2d54cc52e09cbce6694db9f76812c03757d1222c219bbd8a10a7d42ea2086d6641505b3385016345b2cb9b034848de1c7 +DIST like_matcher.patch.bz2 18499 BLAKE2B 6c47c214ea7202fe6c583a024e80c7d2e33812c29b89c5c59114f00f2fcb298d3740cc86e8715c4b993946608c651ec4f5dbcc9ec70f7fac9c33bd508490c9ce SHA512 5b03c3ce53c71fbbb5c811484f58cafd73c061f97afe6bdff2a3f9fabf3027e71b677cbb5b0da41921a2fdcb854a77d551410b3e775967bac1b9a0ffc7333f22 DIST scylla-3.0.6.tar.gz 5821068 BLAKE2B 3f60f6332f721f80f8fbdf6284971e5d8569a1eba9d404f2741dedc03b6abcd40aea8e1605574f6be5edbaac4938622fd8758c0231e90c10d02b459bf2769018 SHA512 d5afa946bd81d5ce17e1d7a3474461a53a94ba665bd82e9774707a153ee584a685ff552d1835cfb1a5cf2558a55d5ded184b4f21af7e95e6ab5161d9fbf3498e +DIST scylla-3.0.7.tar.gz 5824642 BLAKE2B ba0ec5bd1c2e22bc8a0d8b689b992dc2ae53f97a9b805a7159d8d296056626ec3f1f1ae1f9186af934fa473d0fc58b6b96c5c1c8efd498948e10621754c1a3f4 SHA512 b3a65f01738ea01480c3d643655282a9947a997af1c27f095401312cf9917ad9a41df0dd9962122ce05bb2797985ff1e86877a8b0f3fff558d47aa41f0ba9212 DIST scylla-swagger-ui-1b212bbe713905aac22af1edb836f5cf8cc39cc2.tar.gz 1372033 BLAKE2B 5f358f44051a2fa9a10d83fce9cab9e57b56505c4270f089a4d12aaa4e9c45a205665b342a0abb5cf314a9fd24b4186f3a176c58328cc627edc73cc854a30079 SHA512 c726a4dac73d3e9d16624727f4f0703688b7205783c627dd7b88b688b165c9055a1884cf7e9987d8c235d3fa470578852a951e34819431aec12059988394da99 DIST seastar-f541231a3011420e26fb33e71355415334dcb861.tar.gz 849465 BLAKE2B 0547de4c0e8212aa7b6fc36e6281abf8662b0a68125c9d43a6f14de6760f135cd37e6b8a59da4cb77b0f3d296ddfc981e108b41347d2f3c86b8787a17631261e SHA512 6e6415df73ef9fa509c8f3444298e5e9fb9ae8b9cc357289834658654cbca8d5a66db72454a089aecab7ee09cece6ce2cf94d0a391a934e96ed04cbb5c95b6b5 DIST xxhash-744892b802dcf61a78a3f2f1311d542577c16d66.tar.gz 29205 BLAKE2B 594f09421030809ed456ba7af906adfbf1243f7ded4161e7777ec2ef2b9ab24c653923f784a2e00b22731be0378aea76263e39614941432cb0128d972e9ff488 SHA512 f94b1b19d1c232c2e59058514be34ee169f2f11722a088ab401a38dcd75ae693bb0fbe87180060207ebff29f7b3c2a4444db54e4f57c61cac0438c4db1f118f3 EBUILD scylla-3.0.6.ebuild 9030 BLAKE2B a8ac0f6fef3c5b096a8df627c2bd3cb25374214883e655618a2308e6a0652970c2c60d2b48fae42fffd3374189c96441d8cc0c4c7ee5359d500ffe2352058c28 SHA512 87b9fe1aabaedac861fd6868e65501f6e08b75450fa801ba760d0125666445b97cab10683dd07eab7b988d2520d471458ecb5cb867d8822f7ac6d1fe50cb8986 -EBUILD scylla-9999.ebuild 8703 BLAKE2B 3ccdc0dc1493fa3d88b8d1d151f495d393bde6e69f43b96fe5c84c8e3f433a1251fb59f4af0715fa9cdbcdc37568a4b06c0676dc305637f13a07eaa12494a49a SHA512 e2bd764db2886024e2b83a11c1bc78056dc88476af107435be3220cf8471baa7379fb569781a920ad2e822562375f24bd3d1df328be21cb86642543996590a78 +EBUILD scylla-3.0.7.ebuild 9196 BLAKE2B 1bda526163f7f1944f453bf6acedab605d6bfdd4b7d7eefa0b43b868e6fbec64adb4890dd542bba1c423da038a6cca6ac79e2a563fa9d6469664f3f5648225fa SHA512 434ed7dd9e99dea135c228fb09bb79b78584a89414a62a0252dffff13e8669a63781732427b510156ba09e6f989ceebe44f0c4465e950c2b7e12848b9f044898 +EBUILD scylla-9999.ebuild 8706 BLAKE2B c9b0ec1218529376c31dca2981b50144334bfae7851e831cfe9be22c7e314c35714cc05167552e951def4e2431d6e9c159f2ac99617685ea5e6e14178ca2a5b6 SHA512 66935b4054d98bfe51e65ad671360bc4879dd4c673545cea9254c4be6ffdefe6e221c4aa16f70ec114df517547880494661c0b49ecce01bb4a3e71563bb3b7b2 MISC metadata.xml 249 BLAKE2B 40afa233e18ae5678e52194be8b1235d8deda4810e55b33ea192ded6b09a158f1bc941544f90a1b9e396db00bc0fe277c072d267568473ae4aa2dec8bc5c2f89 SHA512 6eae78a65db44c8f7ef2d20c10c8612cd2072c0204c6294798e4bf94f1283c684c22d1ad28e0f68e78e82a0c60526d6786492c9dacc438d83405218e51c1bf9c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQKTBAEBCAB9FiEEGiPLJcoPPNcvDvnY9mwK1B9ohkIFAlzTCKtfFIAAAAAALgAo +iQKTBAEBCAB9FiEEGiPLJcoPPNcvDvnY9mwK1B9ohkIFAl0CZw1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDFB MjNDQjI1Q0EwRjNDRDcyRjBFRjlEOEY2NkMwQUQ0MUY2ODg2NDIACgkQ9mwK1B9o -hkIpQhAAmvIPKmVtxwiw3UyRPt8G+ZT65ouJUU20nMNgNIMShKPD6y2yzAqvt/T5 -6KzQ4yFDcVCmct8Qe3OZl02iy0BsTyZaKrR9YK8hPKQp6zdO9oTbgLjavaflDios -UKrEXw/uGwg6CuQTa1cgL3Kc5JDaW1Lz/0w0fb6vfOfAlmOSdBq/MyyjHxD/FCmK -pz1H3Jk4xlmExgO/EsDrRjhFrwmfbROas10B1b7wQ+szaTl/vgLaUxbBerFK7Ys7 -Ong7CMyYWC+mTOoT/3L+iVL5TsbaGfvIW5zdNqG6w7mGgUsFHbrYe974GBTFu9Y0 -KrXl85fCNGmCa4ymaZT+3SszvQw35c1cwc4Stg6r+ww34kg9wi9cOhNACU0//p46 -DoSGX/JsMoNWjSJWIKso95WLwPbIV498OeXFsxHaWKXNvFSF8BGssmQL+XNlh/o3 -oQMIyQeVAnzRHqJ+8Laq0nwShsmQmBTiakXxB1IQR488yHX+bU7DO5upG73X6oj2 -1z8IH4VkQAB53dSyH0L5KBN3thLP0DvMXQZJRfDF8ADNk2gL4LEfCmSKwF6XHXv/ -agKf1VeWMsi0rTcYWdL66RoWWi+RWsYGPyUYJs3WW9fDhAPoC1YVbYcyLvXkSU8r -H2uL8aI1pVzcTaDcno8ReCJxBUuOKs3p0qyW7/WM4Uc1Oui/9hg= -=0irK +hkJNLg/8CjIua7ftT2FQbYqYF5a4FRhxlM6tfp7Hnw0L0ioElVKlNJzPUaCvDQyt +tn8nmYEoapdnaxAgRiTP+957xgiFL1GFMe5NI9qNs8J7w0apuFnaF9dGaLD32yxa +Vl7t2pwR7aQT4su8yedbHUCaQ+9mSS6ns+xXw71Nc8bRm0hVBP8jzu5L1vxe1uN+ +kPuC8VI2TSurt/cAEBVUCVnu81/ShEnnE4AYXtkXTu3OedQ47QSH9uWGUJfX6/xO +iDWJq5Th+KmUdNovaVbfb4rzTxqi21bNGEU8O22UPvR3rHOncKT9zZNhDSgCpIm6 +iEBTpFW0gMbQPbNDohQr6bHCteTp48346zuR+xk3Qt1EXPiQ9iM7HcCLjfog7sdA +EOnDVWegW2+W9LfKLh89d/45DeS4mwM6Kyn1y//npe43lpSLqZ3kvAdwpiLlmAnR +UmqQUQ97FBCfxOpuKN3CPODyOBX+yP1i0likjwTXLeMvOkn55xzRuOM/1ymL1FZ9 +51PJrpcoxvz6R+fM2zfG6qiYCcXpP6FfJEwMEVo8evAS+Kjs4jvRYJiQ9JGpECiq +CHoFVpr0ojL8RS88Zsr3fB5szjcRKPNENbHzlFY6k8q0rxVn7vg6+jEKOAGXXRg+ +vEILRuzQ5sXL6cfMU3VKh3jGf0lz2iIAN0v+8LIr+oLlxu9N2uU= +=YUkX -----END PGP SIGNATURE----- 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 new file mode 100644 index 0000000..36004bb --- /dev/null +++ b/dev-db/scylla/files/0001-thrift-support-version-0.11-after-THRIFT-2221.patch @@ -0,0 +1,552 @@ +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/scylla-3.0.7.ebuild b/dev-db/scylla/scylla-3.0.7.ebuild new file mode 100644 index 0000000..9d32429 --- /dev/null +++ b/dev-db/scylla/scylla-3.0.7.ebuild @@ -0,0 +1,300 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${PV} == "9999" ]] ; then + #EGIT_COMMIT="scylla-" + EGIT_REPO_URI="https://github.com/scylladb/scylla.git" + inherit git-r3 +else + MY_PV="${PV/_rc/.rc}" + MY_P="${PN}-${MY_PV}" + C_ARES_COMMIT="fd6124c74da0801f23f9d324559d8b66fb83f533" + FMT_COMMIT="f61e71ccb9ab253f6d76096b2d958caf38fcccaa" + LIBDEFLATE_COMMIT="e7e54eab42d7fd3c684cfe8278084fc354a2455a" + SEASTAR_COMMIT="f541231a3011420e26fb33e71355415334dcb861" + SWAGGER_COMMIT="1b212bbe713905aac22af1edb836f5cf8cc39cc2" + XXHASH_COMMIT="744892b802dcf61a78a3f2f1311d542577c16d66" + SRC_URI=" + https://github.com/scylladb/${PN}/archive/scylla-${MY_PV}.tar.gz -> ${MY_P}.tar.gz + https://github.com/scylladb/scylla-seastar/archive/${SEASTAR_COMMIT}.tar.gz -> seastar-${SEASTAR_COMMIT}.tar.gz + https://github.com/scylladb/scylla-swagger-ui/archive/${SWAGGER_COMMIT}.tar.gz -> scylla-swagger-ui-${SWAGGER_COMMIT}.tar.gz + https://github.com/scylladb/fmt/archive/${FMT_COMMIT}.tar.gz -> fmt-${FMT_COMMIT}.tar.gz + https://github.com/scylladb/c-ares/archive/${C_ARES_COMMIT}.tar.gz -> c-ares-${C_ARES_COMMIT}.tar.gz + https://github.com/scylladb/libdeflate/archive/${LIBDEFLATE_COMMIT}.tar.gz -> libdeflate-${LIBDEFLATE_COMMIT}.tar.gz + https://github.com/scylladb/xxHash/archive/${XXHASH_COMMIT}.tar.gz -> xxhash-${XXHASH_COMMIT}.tar.gz + https://ultrabug.fr/gentoo/like_matcher.patch.bz2 + " + KEYWORDS="~amd64" + S="${WORKDIR}/scylla-${MY_P}" +fi + +PYTHON_COMPAT=( python3_{4,5,6} ) + +inherit autotools flag-o-matic linux-info python-r1 toolchain-funcs systemd user + +DESCRIPTION="NoSQL data store using the seastar framework, compatible with Apache Cassandra" +HOMEPAGE="http://scylladb.com/" + +LICENSE="AGPL-3" +SLOT="0" +IUSE="doc systemd" + +# NOTE: +# if you want to debug using backtraces, enable the 'splitdebug' FEATURE: +# https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces +# +# then check out: +# https://github.com/scylladb/scylla/wiki/How-to-resolve-backtrace + +RESTRICT="test" + +RDEPEND=" + >=dev-libs/thrift-0.11.0 + <dev-util/ragel-7.0 + <sys-apps/hwloc-2.0.0 + ~app-admin/scylla-jmx-${PV} + ~app-admin/scylla-tools-${PV} + >=virtual/jdk-1.8.0:* + app-arch/lz4 + app-arch/snappy + dev-cpp/antlr-cpp:3.5 + dev-cpp/yaml-cpp + dev-java/antlr:3.5 + dev-libs/boost[icu] + dev-libs/crypto++ + dev-libs/jsoncpp + dev-libs/libaio + dev-libs/libxml2 + dev-libs/protobuf + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pystache[${PYTHON_USEDEP}] + dev-python/pyudev[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/urwid[${PYTHON_USEDEP}] + dev-util/systemtap + net-libs/gnutls + net-misc/lksctp-tools + sys-apps/ethtool + sys-fs/xfsprogs + sys-libs/libunwind + sys-libs/zlib + sys-process/numactl + x11-libs/libpciaccess + systemd? ( sys-apps/systemd ) +" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-3.5 + dev-util/ninja +" + +# Discussion about kernel configuration: +# https://groups.google.com/forum/#!topic/scylladb-dev/qJu2zrryv-s +CONFIG_CHECK="~NUMA_BALANCING ~SYN_COOKIES ~TRANSPARENT_HUGEPAGE" +ERROR_NUMA_BALANCING="${PN} recommends support for Memory placement aware NUMA scheduler (NUMA_BALANCING)." +ERROR_SYN_COOKIES="${PN} recommends support for TCP syncookie (SYN_COOKIES)." +ERROR_TRANSPARENT_HUGEPAGE="${PN} recommends support for Transparent Hugepage (TRANSPARENT_HUGEPAGE)." + +# NOTE: maybe later depending on upstream energy, support DPDK +# For DPDK, removed HUGETLBFS PROC_PAGE_MONITOR UIO_PCI_GENERIC in favor of VFIO +# CONFIG_CHECK="~NUMA_BALANCING ~SYN_COOKIES ~TRANSPARENT_HUGEPAGE ~VFIO" +# ERROR_VFIO="${PN} running with DPDK recommends support for Non-Privileged userspace driver framework (VFIO)." + +DOCS=( LICENSE.AGPL NOTICE.txt ORIGIN README.md README-DPDK.md ) +PATCHES=( + "${FILESDIR}"/0001-thrift-support-version-0.11-after-THRIFT-2221.patch + "${WORKDIR}"/like_matcher.patch +) + +pkg_pretend() { + if tc-is-gcc ; then + if [[ $(gcc-major-version) -lt 7 && $(gcc-minor-version) -lt 3 ]] ; then + die "You need at least sys-devel/gcc-7.3" + fi + fi +} + +pkg_setup() { + linux-info_pkg_setup + enewgroup scylla + enewuser scylla -1 -1 /var/lib/${PN} scylla +} + +src_prepare() { + default + + # replace git submodules by symlinks + if [[ ${PV} == "9999" ]] ; then + # set version + local git_commit=$(git log --pretty=format:'%h' -n 1) + echo "${PV}-${git_commit}" > version + else + rmdir seastar || die + mv "${WORKDIR}/scylla-seastar-${SEASTAR_COMMIT}" seastar || die + + rmdir seastar/c-ares || die + mv "${WORKDIR}/c-ares-${C_ARES_COMMIT}" seastar/c-ares || die + + rmdir seastar/fmt || die + mv "${WORKDIR}/fmt-${FMT_COMMIT}" seastar/fmt || die + + rmdir swagger-ui || die + mv "${WORKDIR}/scylla-swagger-ui-${SWAGGER_COMMIT}" swagger-ui || die + + rmdir xxHash || die + mv "${WORKDIR}/xxHash-${XXHASH_COMMIT}" xxHash || die + + rmdir libdeflate || die + mv "${WORKDIR}/libdeflate-${LIBDEFLATE_COMMIT}" libdeflate || die + + # set version + echo "${MY_PV}-gentoo" > version + fi + + # fix jsoncpp detection + sed -e 's@json/json.h@jsoncpp/json/json.h@g' -i json.hh || die + + # QA: no -Werror (tho it does not propagate) + sed -e 's/\-Werror//g' -i configure.py || die + + # QA NOTE: respect -O3 as it is upstream recommended + # and because we would kill the RAM of the machine with lower optimization + # since some files can take up to 8GB of RAM to compile! + # sed -e 's/\-O3//g' -i configure.py || die + + # run a clean autoreconf on c-ares + pushd seastar/c-ares + eautoreconf || die + popd + + # I don't agree with the old 4GB of RAM per job, it's more about 8GB now + sed -e 's/4000000000/8000000000/g' -i scripts/jobs || die +} + +src_configure() { + python_setup + + # copied from dist/redhat/scylla.spec.mustache + # we want a package compiled with old kernel headers to + # support nowait aio if the user upgrades their kernel + if ! grep -qwr RWF_NOWAIT /usr/include/linux; then + append-cflags "-DRWF_NOWAIT=8" + fi + if ! grep -qwr aio_rw_flags /usr/include/linux; then + append-cflags "-Daio_rw_flags=aio_reserved1" + fi + + # native CPU CFLAGS are strongly enforced by upstreams, respect that + replace-cpu-flags "*" "native" + + append-cflags "-Wno-attributes -Wno-array-bounds" + + ${EPYTHON} configure.py --enable-gcc6-concepts --mode=release --with=scylla --disable-xen --c-compiler "$(tc-getCC)" --compiler "$(tc-getCXX)" --ldflags "${LDFLAGS}" --cflags "${CFLAGS}" --python ${EPYTHON} --with-antlr3 /usr/bin/antlr3.5 || die +} + +src_compile() { + # we use the provided 'scripts/jobs' to figure out how many parallel + # compilation jobs we can sustain + einfo "Compiling using $(scripts/jobs) jobs" + ninja -v build/release/scylla build/release/iotune -j$(scripts/jobs) || die +} + +src_install() { + # NOTE: + # I base myself on upstream's install.sh file + + default + + local MUSTACHE_DIST="\"debian\": true" + pystache dist/common/systemd/scylla-server.service.mustache "{ $MUSTACHE_DIST }" > build/scylla-server.service + pystache dist/common/systemd/scylla-housekeeping-daily.service.mustache "{ $MUSTACHE_DIST }" > build/scylla-housekeeping-daily.service + pystache dist/common/systemd/scylla-housekeeping-restart.service.mustache "{ $MUSTACHE_DIST }" > build/scylla-housekeeping-restart.service + + insinto /etc/default + doins dist/common/sysconfig/scylla-server + + insinto /etc/security/limits.d + doins dist/common/limits.d/scylla.conf + + insinto /etc/scylla.d + doins dist/common/scylla.d/*.conf + + insinto /etc/sysctl.d + doins dist/common/sysctl.d/*.conf + + insinto /etc/scylla + for config_file in scylla.yaml cassandra-rackdc.properties; do + doins conf/${config_file} + done + + systemd_dounit build/*.service + systemd_dounit dist/common/systemd/*.service + systemd_dounit dist/common/systemd/*.timer + + exeinto /usr/lib/scylla + doexe dist/common/scripts/* + doexe seastar/scripts/* + + dobin build/release/iotune + dobin build/release/scylla + dobin dist/common/bin/scyllatop + + insinto /usr/lib/scylla + doins dist/common/scripts/scylla_blocktune.py + + exeinto /usr/lib/scylla + doexe dist/common/scripts/scylla-blocktune + doexe scylla-housekeeping + + insinto /etc/scylla.d + doins conf/housekeeping.cfg + + newinitd "${FILESDIR}/scylla-server.initd" ${PN}-server + newconfd "${FILESDIR}/scylla-server.confd" ${PN}-server + + dodoc -r licenses + + for x in /var/lib/${PN} /var/lib/${PN}/{data,commitlog,hints,coredump} /var/lib/scylla-housekeeping /var/log/scylla; do + keepdir "${x}" + fowners scylla:scylla "${x}" + done + + insinto /usr/lib/scylla/swagger-ui + doins -r swagger-ui/dist + + insinto /usr/lib/scylla/api + doins -r api/api-doc + + insinto /usr/lib/scylla/scyllatop + doins -r tools/scyllatop/* + fperms +x /usr/lib/scylla/scyllatop/scyllatop.py + + insinto /var/lib/scylla-housekeeping + doins -r scylla-housekeeping + + for util in $(ls dist/common/sbin/); do + dosym /usr/lib/scylla/${util} /usr/sbin/${util} + done + + insinto /etc/sudoers.d + doins dist/debian/sudoers.d/scylla + + insinto /etc/rsyslog.d + doins "${FILESDIR}/10-scylla.conf" + + if ! use systemd; then + insinto /etc/cron.d + newins dist/debian/scylla-server.cron.d scylla_delay_fstrim + fi +} + +pkg_postinst() { + elog "You should run 'emerge --config dev-db/scylla' to finalize your ScyllaDB installation." +} + +pkg_config() { + elog "Running 'scylla_setup'..." + scylla_setup +}
\ No newline at end of file diff --git a/dev-db/scylla/scylla-9999.ebuild b/dev-db/scylla/scylla-9999.ebuild index 07c718f..70bb3e4 100644 --- a/dev-db/scylla/scylla-9999.ebuild +++ b/dev-db/scylla/scylla-9999.ebuild @@ -49,12 +49,12 @@ IUSE="doc systemd" RESTRICT="test" RDEPEND=" - <dev-libs/thrift-0.11.0 + >=dev-libs/thrift-0.11.0 <dev-util/ragel-7.0 <sys-apps/hwloc-2.0.0 ~app-admin/scylla-jmx-${PV} ~app-admin/scylla-tools-${PV} - >=virtual/jdk-1.8.0 + >=virtual/jdk-1.8.0:* app-arch/lz4 app-arch/snappy dev-cpp/antlr-cpp:3.5 |