Commit Graph

2998 Commits

Author SHA1 Message Date
Avi Kivity
993db76ef8 cql3: fix column_condition::collection_in_condition() naming 2015-04-28 18:16:49 +03:00
Avi Kivity
1f5321d958 db: drop unimplemented::COLLECTIONS
All implemented!
2015-04-28 18:02:56 +03:00
Avi Kivity
372b403258 cql3: implement schema::has_collections() 2015-04-28 18:02:35 +03:00
Avi Kivity
44f44bbeeb cql3: convert collection-related items in single_column_relation to C++ 2015-04-28 18:01:54 +03:00
Avi Kivity
97f689eb03 cql3: convert single_column_restriction::IN_with_marker to C++ 2015-04-28 18:00:35 +03:00
Avi Kivity
9c446a5465 cql3: convert RequestValidations.java to C++ 2015-04-28 17:05:32 +03:00
Avi Kivity
4e91a3b005 tests: add test for list append/prepend operations 2015-04-28 12:13:38 +03:00
Avi Kivity
448d67053f cql3: convert operation::prepend to C++ 2015-04-28 12:13:38 +03:00
Avi Kivity
abca68458e cql3: convert lists::prepender to C++
Note the original code contains a bug, causing the prepended literal to
be reversed.  The conversion (and Origin) are fixed.
2015-04-28 12:13:38 +03:00
Avi Kivity
4736504f4a cql3: convert lists::marker::bind() to C++ 2015-04-28 12:13:38 +03:00
Avi Kivity
9131c094a7 cql3: convert lists::precision_time to C++ 2015-04-28 12:13:38 +03:00
Avi Kivity
38a09a6c1a cql3: remove gunk from lists.hh 2015-04-28 12:10:33 +03:00
Avi Kivity
47f1fe8eb5 cql3: implement list append operation
UPDATE tab SET mylist = mylist + [1, 2, 3]
2015-04-27 14:54:16 +03:00
Avi Kivity
dc9e705952 cql3: convert lists::appender to C++ 2015-04-27 14:53:51 +03:00
Avi Kivity
f1219c1d74 cql3: enable collections in column_condition 2015-04-27 14:43:43 +03:00
Avi Kivity
28f9f629c9 Merge branch 'asias/locator_v1' of github.com:cloudius-systems/seastar-dev into db
Convert some more snitch related classes, from Asias.
2015-04-27 10:46:05 +03:00
Asias He
b8e56254ee locator: Convert RackInferringSnitch.java to C++ 2015-04-27 15:13:14 +08:00
Asias He
c8c7a37afa locator: Import RackInferringSnitch.java 2015-04-27 14:58:18 +08:00
Asias He
bc034aeaec locator: Convert AbstractNetworkTopologySnitch.java to C++ 2015-04-27 14:57:25 +08:00
Asias He
23ae3da303 locator: Import AbstractNetworkTopologySnitch.java 2015-04-27 14:15:00 +08:00
Avi Kivity
b3b553821f Merge branch 'master' of github.com:cloudius-systems/seastar into db
Contains patch from Amnon to update the calls to http set_routes().
2015-04-26 13:16:35 +03:00
Amnon Heiman
f06c12e031 http: fix crash due to set_routes() not managing lifetime correctly
When using the set_routes with the registry builder, the shared_ptr of
the registry builder should be captured.

In the original implementation the api_registery_builder captured this
parameter, but as the shared_ptr was not captured it was deleted,
causing the http to crash when running in debug.

In this implementation the method that use the registry creates a lambda
function and inside it calls the set_api_doc method, this allows to
catch the shared_ptr so it lives until the function complete.

It also replaces the c style cast to static_cast and add a FIXME note to
the routes implementation, that handlers should be deleted to prevent
memory leak.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-04-26 13:09:26 +03:00
Avi Kivity
65b8b19ca7 Merge branch 'tgrabiec/order-partitions-by-decorated-key' of github.com:cloudius-systems/seastar-dev into db
Use decorated_key in partition maps, from Tomasz:

"Partitions should be ordered using Origin's ordering, which is the natural
ordering of decorated_key. This is achieved by switching column_family's
partition map to use decorated_key instead of a bare partition_key.

This also includes some cleanups."

[avi] trivial adjustments to sstables/keys.cc
2015-04-25 19:22:51 +03:00
Avi Kivity
53eb59e8ab Merge branch 'bsearch' of github.com:glommer/urchin into db
sstable index/summary binary search, from Glauber.
2015-04-25 18:54:43 +03:00
Avi Kivity
adfd737ad9 Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-04-25 18:54:11 +03:00
Glauber Costa
2b8035a718 sstring: add a fill constructor
std::string has it, we don't.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Reviewed-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-04-25 02:02:04 +03:00
Tomasz Grabiec
5a7e3d3278 db: Order partitions by decorated_key
Partitions should be ordered using Origin's ordering, which is first
by token, then by Origin's representation of the key. That is the
natural ordering of decorated_key.

This also changes mutation class to hold decorated_key, to avoid
decoration overhead at different layers.
2015-04-24 18:01:01 +02:00
Tomasz Grabiec
474dbbbc88 db/serializer: Avoid unnecessary lookup of column family ID
We can now get it from schema.
2015-04-24 18:01:01 +02:00
Tomasz Grabiec
9f3053a867 db/serializer: Fix coding style 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
1c3275c950 mutation: Encapsulate fields 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
2b157a5526 locator: Take token by const& 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
71041eb0d6 dht: Implement operator<< for decorated_key 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
841a13da93 dht: Implement operator!= for decorated_key 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
4641bc6f95 database: Move implementation to source file 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
88b9966c38 keys: Avoid unnecessary lw_shared_ptr copy 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
a9972b4b28 Relax header dependencies 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
6c07f4ae5d Introduce database_fwd.hh with forward declarations 2015-04-24 18:01:01 +02:00
Tomasz Grabiec
731a63e371 schema: Embed raw_schema inside schema
Public fields got encapsulated.
2015-04-24 18:01:01 +02:00
Glauber Costa
00f8c148d6 tests: test summary binary search.
Make sure that, for selected Summary files, the first key is always found to be
in position 0. In order to do that, we need to create an sstable::key. By having
this test using multiple data types (including collections and composites), we also
make sure that the serialization is sound.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-24 10:11:50 -04:00
Glauber Costa
28f936d6d2 sstables: summary binary search
Search code is trivially taken from Origin, but adapted so that the comparison
is done explicitly.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-24 10:11:50 -04:00
Glauber Costa
8508a246bb sstable: convenient view for types
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-24 10:11:49 -04:00
Glauber Costa
7c7da26347 dht: generate a token from a bytes_view
It has been determined that we will store partition_keys in the decorated_keys.
That is totally fine, but the token needs to be generatable from an sstable::key
as well.

Since both types convert well to a bytes_view - and the first thing get_token() does
is precisely to generate that view, let's generate the token from a bytes_view instead.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-24 10:11:49 -04:00
Glauber Costa
5b8b2e835a sstable: add sstable::key type
We have our own representation of a partition_key, clustering_key, etc. They
may different slightly from a legacy sstable key because we don't necessarily
serialize composites in our internal representation the same way as Origin
does. This patch encodes the Origin composite serialization, so we can create
keys that are compatible with Origin's understanding of what a partition key
should look like.

This whould be used when serializing or deserializing to/from an sstable.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-24 10:11:49 -04:00
Glauber Costa
7677a3423e schema: specify the kind of join we want
If we end up including more than one boost::<>::join, like
boost::range::join and boost::string::join, that will create an ambiguity.

The compiler doesn't like it very much.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-24 10:11:49 -04:00
Tomasz Grabiec
c963821e1d db: Extract schema-specific code to schema.cc 2015-04-23 20:54:12 +02:00
Avi Kivity
a93f7e5525 Merge branch 'asias/gossip_v2' of github.com:cloudius-systems/seastar-dev into db
Gossip update, from Asias:

"With this series, gossip now can:

1) Detect if remote node is down, if so deletes that node.
2) Update heat beat version number properly.
3) application_state::Load info is updated periodically and
   gossiped around correctly."
2015-04-23 19:19:19 +03:00
Avi Kivity
da8782b9e5 Merge branch 'tgrabiec/code-moves' of github.com:cloudius-systems/seastar-dev into db
Cleanups in preparation for memtables, from Tomasz.
2015-04-23 18:44:40 +03:00
Pekka Enberg
d23b7796f8 dht/i_partitioner.hh: Make decorated key operators visible
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-23 10:34:34 +02:00
Asias He
9377cdcc45 tests: Add exception tests to tests/urchin/message.cc 2015-04-23 14:55:27 +08:00
Asias He
346d00cc8c tests: Add listen-address option to tests/urchin/message.cc 2015-04-23 14:55:27 +08:00