mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 17:10:35 +00:00
This patch adds initial support for PREPARE and EXECUTE requests which are used by the CQL binary protocol for prepared statements. The use of prepared statement gives a nice 2.5x single core performance boost for Urchin: $ ./build/release/seastar --data data --smp 1 $ ./tools/bin/cassandra-stress write -mode cql3 simplenative -rate threads=32 Results: op rate : 31728 partition rate : 31728 row rate : 31728 latency mean : 1.0 latency median : 0.9 latency 95th percentile : 1.8 latency 99th percentile : 1.8 latency 99.9th percentile : 5.6 latency max : 181.7 Total operation time : 00:00:30 END $ ./tools/bin/cassandra-stress write -mode cql3 simplenative prepared -rate threads=32 Results: op rate : 75033 partition rate : 75033 row rate : 75033 latency mean : 0.4 latency median : 0.4 latency 95th percentile : 0.7 latency 99th percentile : 0.8 latency 99.9th percentile : 3.4 latency max : 205.0 Total operation time : 00:00:30 END Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
31 lines
679 B
C++
31 lines
679 B
C++
/*
|
|
* Copyright (C) 2015 Cloudius Systems, Ltd.
|
|
*/
|
|
|
|
#ifndef CQL_SERVER_HH
|
|
#define CQL_SERVER_HH
|
|
|
|
#include "core/reactor.hh"
|
|
#include "service/storage_proxy.hh"
|
|
#include "cql3/query_processor.hh"
|
|
#include "core/distributed.hh"
|
|
|
|
class database;
|
|
|
|
class cql_server {
|
|
std::vector<server_socket> _listeners;
|
|
service::storage_proxy& _proxy;
|
|
distributed<cql3::query_processor>& _query_processor;
|
|
public:
|
|
cql_server(service::storage_proxy& proxy, distributed<cql3::query_processor>& qp);
|
|
future<> listen(ipv4_addr addr);
|
|
void do_accepts(int which);
|
|
private:
|
|
class fmt_visitor;
|
|
class connection;
|
|
class response;
|
|
friend class type_codec;
|
|
};
|
|
|
|
#endif
|