Tomasz Grabiec
57413618e8
Merge branch 'range-tombstone-v9' from https://github.com/duarten/scylla.git
...
From Duarte:
This patchset adds the range_tombstone_list data structure,
used to hold a set of disjoint range tombstones, and changes
the internal representation of row tombstones to use that
data structure.
Fixes #1155
[tgrabiec: Added compound_wrapper::make_empty(const schema&) overload
to fix compilation failure in tracing code]
2016-06-02 22:17:17 +02:00
Duarte Nunes
91aac30f12
mutations: Row tombstones are now a set of ranges
...
This patch changes the type of the mutation partition's row_tombstones
to be a range_tombstone_list, so that they are now represented as a
set of disjoint ranges. All of its usages are updated accordingly.
Fixes #1155
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-06-02 16:21:59 +02:00
Pekka Enberg
f64c25a495
cql3/statements/select_statement: Unify coding style
...
The coding style in select_statement.cc is very inconsistent which makes
the code hard to read. Clean that up.
Message-Id: <1464871790-21031-1-git-send-email-penberg@scylladb.com >
2016-06-02 16:17:21 +02:00
Vlad Zolotarov
4c17a422e0
cql3: instrument a SELECT query to send tracing info
...
Instrument a coordinator of a SELECT query to send tracing session
info to the corresponding replica Nodes.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com >
2016-06-01 20:17:25 +03:00
Vlad Zolotarov
6e26909b02
query::read_command: add an optional trace_info field
...
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com >
2016-06-01 20:17:19 +03:00
Vlad Zolotarov
099ff0d2d5
transport: instrument a QUERY with tracing
...
- Store a trace state inside a client_state.
- Start tracing in a cql_server::connection::process_query().
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com >
2016-06-01 20:14:29 +03:00
Vlad Zolotarov
63c724c41d
service::client_state: make private fields actually private
...
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com >
2016-06-01 20:13:53 +03:00
Avi Kivity
c8b5104aa5
cql3: extract raw batch_statement into raw sub-namespace
...
prepare() was moved to .cc to avoid circular dependencies.
2016-05-31 21:41:26 +03:00
Avi Kivity
1d144699f6
cql3: extract raw delete_statement into raw sub-namespace
2016-05-31 21:24:56 +03:00
Avi Kivity
e596799962
cql3: extract raw update_statement into raw sub-namespace
...
update_statment also has an insert_statement counterpart, convert it too.
2016-05-31 21:16:53 +03:00
Avi Kivity
10213c4211
cql3: extract raw modification_statement into raw sub-namespace
2016-05-31 20:53:37 +03:00
Avi Kivity
f3fc3afe00
cql3: optimize make_empty_metadata()
...
All empty metadata objects are equal, so make just one and keep returning
it.
Message-Id: <1464334638-7971-4-git-send-email-avi@scylladb.com >
2016-05-31 09:12:20 +03:00
Avi Kivity
0135b4d5cd
cql3: constify metadata users
...
Metadata usually doesn't change after it is created; make that visible in
the code, allowing further optimizations to be applied later.
Message-Id: <1464334638-7971-3-git-send-email-avi@scylladb.com >
2016-05-31 09:12:11 +03:00
Avi Kivity
6728454591
cql3: rationalize extract_result_metadata()
...
Rather than dynamic_cast<>ing the statement to see whether it is a
select statement, add a virtual function to cql_statement to get the
result metadata.
This is faster and easier to follow.
Message-Id: <1464334638-7971-2-git-send-email-avi@scylladb.com >
2016-05-31 09:12:02 +03:00
Avi Kivity
25b3d74f45
cql3: Split select_statement::raw_statement into raw namespace
...
cql3::select_statement::raw_statement
-> cql3::raw::select_statement
Message-Id: <1464609556-3756-4-git-send-email-avi@scylladb.com >
2016-05-31 09:09:30 +03:00
Avi Kivity
c8f98c5981
cql3: move cf_statement into raw hierarchy
...
cql3::statements::cf_statement
-> cql3::statements::raw::cf_statement
Message-Id: <1464609556-3756-3-git-send-email-avi@scylladb.com >
2016-05-31 09:09:21 +03:00
Avi Kivity
caf8d4f0e6
cql3: separate parsed_statement and parsed_statment::prepared
...
cql3::statements::parsed_statement
-> cql3::statements::raw::parsed_statement
cql3::statements::parsed_statement::prepared
-> cql3::statements::prepared_statement
Message-Id: <1464609556-3756-2-git-send-email-avi@scylladb.com >
2016-05-31 09:09:10 +03:00
Gleb Natapov
7f6b12c97a
query: add user provided timestamp to read_command
...
If read query supplies timestamp move it to read_command to be
used later otherwise get local timestamp.
2016-05-24 15:19:35 +03:00
Pekka Enberg
9c450f673c
cql3: Clean up prepared_metadata class
...
Return vectors by const reference in prepared_metadata class and add a
FIXME to result_message class.
Message-Id: <1463425756-20225-1-git-send-email-penberg@scylladb.com >
2016-05-17 10:02:14 +03:00
Pekka Enberg
217c1ffa95
cql3: Specify result set flag ABI explicitly
...
As Avi points out, the flag values are an ABI. So specify them explicitly.
Message-Id: <1463413379-8355-1-git-send-email-penberg@scylladb.com >
2016-05-16 19:00:52 +03:00
Pekka Enberg
868ff5107c
cql3: Introduce prepared_metadata class
...
Introduce a new prepared_metadata class that holds prepared statement
metadata and implement CQL binary protocol serialization that works for
all versions.
2016-05-16 18:06:01 +03:00
Pekka Enberg
a68671e247
cql3: Add column_specification::all_in_same_table() helper
...
We need it the prepared_metadata class that we're about to introduce.
2016-05-16 14:13:31 +03:00
Pekka Enberg
adfb4d7bbd
cql3: Move result_set class implementation to source file
2016-05-16 13:20:45 +03:00
Pekka Enberg
8552f222f5
cql3: Clean up result_set class
...
Kill some left-over ifdef'd code from the result_set class.
Message-Id: <1463392997-22921-1-git-send-email-penberg@scylladb.com >
2016-05-16 13:09:37 +03:00
Tomasz Grabiec
13d8cd0ae9
migration_manager: Invalidate prepared statements on every schema change
...
Currently we only do that when column set changes. When prepared
statements are executed, paramaters like read repair chance are read
from schema version stored in the statement. Not invalidating prepared
statements on changes of such parameters will appear as if alter took
no effect.
Fixes #1255 .
Message-Id: <1462985495-9767-1-git-send-email-tgrabiec@scylladb.com >
2016-05-12 08:58:40 +03:00
Calle Wilund
152bd82a05
alter_keyspace_statement: Handle missing replication strategy
...
ALTER KEYSPACE should allow no replication strategy to be set,
in which case old strategy should be kept.
Initial translation from origin missed this.
Fixes #1256
Message-Id: <1462967584-2875-2-git-send-email-calle@scylladb.com >
2016-05-11 16:02:22 +03:00
Calle Wilund
5604fb8aa3
cql3::statements::cf_prop_defs: Fix compation min/max not handled
...
Property parsing code was looking at wrong property level
for initial guard statement.
Fixes #1257
Message-Id: <1462967584-2875-1-git-send-email-calle@scylladb.com >
2016-05-11 16:02:16 +03:00
Calle Wilund
147aa81177
Cql.g: Handle ALTER KEYSPACE
2016-05-10 14:36:46 +00:00
Calle Wilund
5c36d2e09e
alter_keyspace_statement: Implement
...
Note: Like create keyspace, we don't properly validate
replication strategy yet.
2016-05-10 14:36:17 +00:00
Vlad Zolotarov
813ad4024f
query_processor: account unprepared statements executions
...
Add the statistics counter for a number of unprepared statements
executions and expose it with collectd.
Since in our implementation a number of unprepared statements executions
equals to a number of executions of prepare() function we may simply
increment the new statistics counter every time query_processor::get_statement()
is called.
Fixes #1068
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com >
Message-Id: <1461503492-32228-1-git-send-email-vladz@cloudius-systems.com >
2016-04-24 16:55:15 +03:00
Pekka Enberg
7af9ac2880
Merge "Add support for User Defined Types" from Duarte
...
"This patchset enables support for user defined types,
completing the functionality that was already in place.
Fixes #426 "
2016-04-20 21:26:03 +03:00
Duarte Nunes
7911438de0
udt: Add grammar for altering user types
...
This patch adds support in Cql.g for the alter user type statement.
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-04-20 18:07:07 +02:00
Duarte Nunes
fbf70e9bed
udt: Add alter type statement
...
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-04-20 18:07:07 +02:00
Duarte Nunes
6cb57a567f
udt: Add grammar for dropping user types
...
This patch adds support in Cql.g for the drop user type statement.
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-04-20 18:07:06 +02:00
Duarte Nunes
809b45e160
udt: Add drop type statement
...
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-04-20 18:07:02 +02:00
Calle Wilund
7f85373e15
cql3/drop_table_statement: Fix exception handling in access check
...
Tried to handle possibly benign exception in continuation, but
this is always thrown synchronously.
Fixes ttl_test dtest failures.
Message-Id: <1461154499-10674-1-git-send-email-calle@scylladb.com >
2016-04-20 15:49:04 +03:00
Duarte Nunes
35a88b5d49
udt: Complete create_type_statement
...
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-04-20 09:54:06 +02:00
Duarte Nunes
2c15778fe0
udt: Remove user_types field from keyspace
...
This field is superfluous and adds confusion regarding the user_types
field in the keyspace metadata.
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
2016-04-20 09:54:06 +02:00
Duarte Nunes
40c1b29701
cql3: Implement contains relation
...
Although it doesn't work in the absence of secondary indexes,
now we provide the same error messages as origin when trying to use
the contains relation.
Fixes #1158
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
Message-Id: <1461088626-26958-1-git-send-email-duarte@scylladb.com >
2016-04-20 09:22:25 +03:00
Calle Wilund
9ed25a970e
Cql.g: Permission statements parsing
2016-04-19 11:49:06 +00:00
Calle Wilund
3b101c6e19
cql3::statements::drop_user_statement: Drop all permissions for user
2016-04-19 11:49:06 +00:00
Calle Wilund
14cc47d8b9
cql3::statements::revoke_statement: Initial conversion
2016-04-19 11:49:06 +00:00
Calle Wilund
4e1ef3c1bc
cql3::statements::grant_statement: Initial conversion
2016-04-19 11:49:05 +00:00
Calle Wilund
04c37def3a
cql3::statements::list_permissions_statement: Initial conversion
2016-04-19 11:49:05 +00:00
Calle Wilund
fe23447f6f
cql3::statements::permission_altering_statement: Inital conversion
...
Alter permission base typ
2016-04-19 11:49:05 +00:00
Calle Wilund
add2111c0a
cql3::statements::authorizarion_statement: Initial conversion
...
Auth cql base type
2016-04-19 11:49:05 +00:00
Calle Wilund
3906dc9f0d
cql3::statements: Change check_access to future<> + implement
2016-04-19 11:49:05 +00:00
Calle Wilund
690c7207fe
cql3::untyped_result_set: Add get_set<> method
...
Gets a value as a, you guessed it, set.
2016-04-18 13:51:15 +00:00
Gleb Natapov
f3b515052b
udt: fix error generation if accessed type is not udt
...
Fixes #1198
Message-Id: <1460884314-3717-2-git-send-email-gleb@scylladb.com >
2016-04-18 12:45:03 +03:00
Duarte Nunes
ece89069dd
udt: Implement to_string() for selectable
...
Signed-off-by: Duarte Nunes <duarte@scylladb.com >
Message-Id: <1460884314-3717-1-git-send-email-gleb@scylladb.com >
2016-04-18 12:44:48 +03:00