Commit Graph

53948 Commits

Author SHA1 Message Date
Glauber Costa
4e73bf8b11 sstables: deletion_time structure
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-15 10:47:33 +02:00
Tomasz Grabiec
74e34ed6a4 core: Use futurize<> to simplify smp::submit_to() 2015-03-14 11:40:48 +02:00
Tomasz Grabiec
7bc7951192 core: Use perfect forwarding in invoke_on()/submit_to()
Makes invoking non-copyable lambdas possible:

  distributed<T> t;

  non_copyable_type x;
  t.invoke_on(0, [x = std::move(x)] (auto& t) {});

As a side effect this could save some copyable lambdas from being
needlesly copied.
2015-03-13 19:20:13 +02:00
Pekka Enberg
be1e8362bb cql3: Use copy semantics for CF name
Use copy semantics for CF name because in some cases we are passing a
reference to another class instance field (e.g. for create table
statements).

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-13 09:43:47 +01:00
Avi Kivity
9e6b529f91 build: reduce merge conflicts in configure.py test specification 2015-03-12 16:31:43 +02:00
Avi Kivity
df7bb8cc58 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	configure.py
2015-03-12 16:31:17 +02:00
Avi Kivity
d5817ab965 Merge branch 'gleb/rpc' of github.com:cloudius-systems/seastar-dev
Conflicts:
	configure.py
2015-03-12 16:30:15 +02:00
Tomasz Grabiec
24c29f8947 Merge remote-tracking branch 'dev/penberg/cleanups' 2015-03-12 15:16:42 +01:00
Shlomi Livne
83998a8934 tests: Boostify the fstream_test
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-03-12 15:56:25 +02:00
Gleb Natapov
7adf4f935d rpc test program 2015-03-12 15:38:18 +02:00
Gleb Natapov
36b76af7cc Implementation of rpc
To register rpc handler func(param1, param2, param3) both server and client

auto remote_func = myrpc.register_handler(id, func);

This call will return another function that client can use to invoke RPC
calls like this:

remote_func(client, param1, param2, param3);

This call will return future<> with func() result.
2015-03-12 15:38:18 +02:00
Shlomi Livne
83c0196255 tests: make sure each SEASTAR_TEST_CASE has at least a single BOOST_XXX check
SEASTAR_TEST_CASE that did not execute a single BOOST_XXX check was
maakred as "[Message] - Test case .... did not check any assertions" and
is placed in /usr/include/boost/test/impl/results_collector instead of
the correct test file.

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-03-12 15:21:29 +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
22a6066730 Revert "cql3: Fix create_keyspace_statement::prepare()"
This reverts commit c72f5796c4. It is no
longer needed after commit 8628d98 ("shared_ptr: fix reference count
loss when creating a derived type with e_s_f_t").

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>

Conflicts:
	cql3/statements/schema_altering_statement.hh
2015-03-12 13:02:53 +02:00
Tomasz Grabiec
2ee58d66d6 Merge tag 'avi/collections/v3'
Conflicts:
	tests/urchin/cql_query_test.cc

[tgrabiec: fixed compilation error in cql3/maps.hh]
2015-03-12 11:30:17 +01:00
Tomasz Grabiec
ca046f00fc Merge remote-tracking branch 'dev/penberg/create-keyspace-stmt'
From Pekka:

This series adds 'create keyspace' support to the CQL parser and AST
executor. As a side-effect, we pull metadata classes from config as well
as migration manager from services.

Please note that migration manager is a stub for now so no actual
keyspace is created in the database internals.
2015-03-12 10:31:32 +01:00
Pekka Enberg
3f019ee9c0 tests: create keyspace statement test case
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:30:25 +02:00
Pekka Enberg
e1948dcc0c cql3: Convert create_keyspace_statement to C++, take 2
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:30:25 +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
Pekka Enberg
5b3922f860 transport: Convert Event.SchemaChange constructors, take #2
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Pekka Enberg
07e73bdb26 cql3/Cql.g: Implement convert_property_map() helper
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Pekka Enberg
bcb6c1b9c3 service: Convert MigrationManager to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Pekka Enberg
5bdf0e4429 service: Import MigrationManager.java
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Pekka Enberg
2bff7888b6 unimplemented: Add MIGRATIONS
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Pekka Enberg
6f15c18f0a cql3: Convert KSPropDefs to C++, take #2
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Pekka Enberg
57e6c63b7a cql3: Convert statements.PropertyDefinitions to C++, take 3
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Pekka Enberg
75a3595691 config: Convert KSMetaData to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:29:51 +02:00
Avi Kivity
d41b4e57ad tests: add test for map literal and setting a map value by key 2015-03-12 10:22:17 +02:00
Avi Kivity
20e616131f cql3: convert grammar for map literals and setting a map value by key 2015-03-12 10:22:17 +02:00
Avi Kivity
6e646efb85 cql3: implement operation::setter::prepare() for maps 2015-03-12 10:22:17 +02:00
Avi Kivity
1172f65d50 cql3: convert maps::setter_by_key to C++ 2015-03-12 10:22:17 +02:00
Avi Kivity
a64cd8f22f cql3: convert maps::literal to C++ 2015-03-12 10:22:17 +02:00
Avi Kivity
0f793f1aa7 cql3: convert maps::delayed_value to C++ 2015-03-12 10:22:15 +02:00
Pekka Enberg
a5aefb5ef2 config: Import KSMetaData.java
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:19:19 +02:00
Pekka Enberg
df5fe24ed7 config: Convert UTMetaData to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:19:19 +02:00
Pekka Enberg
a372a9170b config: Import UTMetaData.java
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:19:19 +02:00
Avi Kivity
561d72879a cql3: convert maps::value to C++ 2015-03-12 10:14:25 +02:00
Avi Kivity
33f6703be6 cql3: move enable_shared_from_this up the cql3::term hierarchy
Casting upwards past an enable_shared_from_this confuses shared_ptr,
so move it to the base of the hierarchy.
2015-03-12 10:10:43 +02:00
Avi Kivity
70d1be8e82 cql3: add stringifying operators
Helps during debugging.
2015-03-12 10:10:43 +02:00
Avi Kivity
08b07f5093 cql3: add helpers to assignment_testable
Less qualification needed.
2015-03-12 10:10:43 +02:00
Avi Kivity
ca308698df collection_type_impl: add to_value(mutation_view)
Allows collapsing a mutation into a literal.
2015-03-12 10:10:42 +02:00
Avi Kivity
7c5d865aac db: add map_type::serialize_partially_deserialized_from
Add a way to convert a vector of pairs of serialized key/values to
the fully serializied form; useful for map literals.
2015-03-12 10:10:42 +02:00
Avi Kivity
fc9a8d6efd db: add collection_type_impl::pack
A helper function for other operations, as all collections share
the basic serialized format.
2015-03-12 10:10:42 +02:00
Avi Kivity
3c63f77824 db: split collection_type_impl::mutation into an owning and view types
The view type is more efficient, but less safe.
2015-03-12 10:10:42 +02:00
Avi Kivity
0bd44deca9 db: add abstract_type::as_less_comparator()
Returns a binary predicate that allows comparing two values belonging
to the type, suitable for STL containers and algorithms.
2015-03-12 10:10:41 +02:00
Avi Kivity
769824655e types: add forward declarations for collection serialization operations 2015-03-12 09:56:53 +02:00
Avi Kivity
362dbd5c94 types: add bytes_view variant of write_collection_value() 2015-03-12 09:56:53 +02:00
Avi Kivity
56d4592e00 atomic_cell: add view::serialize() helper 2015-03-12 09:56:53 +02:00
Avi Kivity
f226f93120 fix collection_type_impl::merge 2015-03-12 09:56:53 +02:00
Avi Kivity
49a93b333b cql: pass operations by reference to specializedColumnOperation
If we want our

   set map[key] = value

operation to work, we better return it from the parser.
2015-03-12 09:56:53 +02:00