Commit Graph

35 Commits

Author SHA1 Message Date
Calle Wilund
9c1d088718 exceptions: add authorization exceptions 2016-01-13 08:49:01 +00:00
Pekka Enberg
3cb60556e9 cql3: Implement truncate_statement::execute()
Implement the execute() function by using the underlying
truncate_blocking() API from storage proxy.
2015-09-30 09:09:43 +02:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Gleb Natapov
d8dd5a9c01 Remove unneeded namespace qualifiers. 2015-08-12 16:12:10 +03:00
Gleb Natapov
ea2632e15b Move overloaded_exception to exceptions.hh 2015-08-12 16:12:09 +03:00
Gleb Natapov
0b3d2de2f1 Fix mutation write timeout exception reporting
Make it compatible with CQL specification
2015-08-12 14:58:48 +03:00
Pekka Enberg
980dc910d9 exceptions: Move protocol_exception to exceptions.hh
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-28 13:44:20 +03:00
Pekka Enberg
dcbf8d5a9c transport/server: Fix UNPREPARED error encoding
Fix UNPREPARED error encoding to follow the CQL transport protocol spec.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-28 10:36:53 +02:00
Pekka Enberg
1c039f9855 exceptions/exceptions.hh: Use 'pragma once' as include guard
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-28 10:06:18 +03:00
Pekka Enberg
3803e0ed5b exceptions: Move request_timeout_exception to exceptions.hh
Now that consistency level dependency issues are sorted out, move
request_timeout_exception to exceptions.hh.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-28 10:06:18 +03:00
Pekka Enberg
0b8c67ed79 exceptions: Move unavailable_exception to exceptions.hh
Move unavailable_exception to exceptions.hh where other CQL transport
level exceptions are defined in.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-28 10:06:18 +03:00
Pekka Enberg
a9f2a798c9 exceptions: Add read_timeout_exception class
We'll need it for properly encoding READ_TIMEOUT errors in the CQL
transport protocol.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-27 17:32:47 +03:00
Paweł Dziepak
ac776d2618 exceptions: remove transport_exception
transport_exception is an interface implemented by both
cassandra_exception and protocol_exception. The logic implemented in
both these subclasses is identical.

This patch removes transport_exception and makes protocl_exception a
subclass of cassandra_exception.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-09 13:39:31 +02:00
Paweł Dziepak
8945fc1cb2 exceptions: make invalid_request a subclass of request_validation
invalid_request_exceptions is one of the exceptions that should be
propagated to the client in form of a error code. That's why it should
belong to a hierarchy with cassandra_exception at root, so that all
exceptions like that can be easily caught and passed to the client.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:36:58 +02:00
Paweł Dziepak
024a706692 exceptions: remove duplicate marshal_exception
There are both marshal_exception (defined in types.hh) and
exceptions::marshal_exception (defined ini exceptions/exceptions.hh).
The latter is never thrown by anything but caught in few places which
obviously is incorrect.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:36:48 +02:00
Glauber Costa
b16f1968e7 exceptions: allow for message in unsupported operation
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-05-19 11:22:41 -04:00
Pekka Enberg
d04c41d8a8 transport: CQL prepared statements
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>
2015-03-19 15:54:46 +02:00
Pekka Enberg
84d402447f exceptions: Remove TransportException.java
The class was converted to C++ in commit 6601e6a ("exceptions: Convert
SyntaxException and its base classes").

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 13:03:52 +02:00
Pekka Enberg
f2d0f325d4 exceptions: Add already_exists_exception class
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Tomasz Grabiec
c9a846f20c exceptions: Add unsupported_operation_exception 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
edbdd1dd1a exceptions: Make exception_code an enum class 2015-02-16 12:00:03 +01:00
Tomasz Grabiec
87821f2d12 Add missing copyright banners 2015-02-12 19:40:59 +01:00
Tomasz Grabiec
5e742cc13d cql3: Convert QueryProcessor 2015-02-12 19:40:58 +01:00
Tomasz Grabiec
6601e6a24f exceptions: Convert SyntaxException and its base classes 2015-02-12 19:40:57 +01:00
Tomasz Grabiec
c27bdb652b exceptions: Import CassandraException.java 2015-02-12 19:40:57 +01:00
Tomasz Grabiec
59803cce10 exceptions: Import RequestValidationException.java 2015-02-12 19:40:57 +01:00
Tomasz Grabiec
54dbc5de25 exceptions: Import SyntaxException.java 2015-02-12 19:40:57 +01:00
Tomasz Grabiec
09c54d256d excpetions: Convert ExceptionCode 2015-02-12 19:40:57 +01:00
Tomasz Grabiec
e8a4336c55 exceptions: Import TransportException 2015-02-12 19:40:57 +01:00
Tomasz Grabiec
ae725626d5 exceptions: Import ExceptionCode.java 2015-02-12 19:40:57 +01:00
Tomasz Grabiec
867ec42b59 cql3: Convert Relation 2015-02-04 10:29:00 +01:00
Tomasz Grabiec
ab17520a11 exception: Import UnrecognizedEntityException.java 2015-02-04 10:29:00 +01:00
Tomasz Grabiec
b7cf3a679d Convert ThriftValidation.validateColumnFamily(String,String)
Unlike origin, we don't use global singleton, but accept a database
reference instead.
2015-02-04 10:28:59 +01:00
Tomasz Grabiec
506ac2ea9a exceptions: Fix include 2015-01-25 12:51:23 +01:00
Pekka Enberg
3ca0ed10be cql3: convert Attributes to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-07 17:05:29 +02:00