Commit Graph

5811 Commits

Author SHA1 Message Date
Asias He
0f2e4003ce storage_service: Implement handle_state_moving 2015-08-18 17:06:03 +08:00
Asias He
8a7f7d5d8b storage_service: Implement handle_state_left 2015-08-18 17:06:03 +08:00
Asias He
455ea0e87c storage_service: Implement handle_state_leaving 2015-08-18 17:06:03 +08:00
Asias He
7c72ed227b storage_service: Enable !join_ring case in init_server 2015-08-18 17:06:03 +08:00
Asias He
c111f8395c storage_service: Enable load_tokens logic in init_server 2015-08-18 17:06:03 +08:00
Asias He
67953a65b6 db/system_keyspace: Stub load_host_ids 2015-08-18 17:06:03 +08:00
Asias He
ab40ab6c19 db/system_keyspace: Stub load_tokens 2015-08-18 17:06:02 +08:00
Asias He
a8efcac89b storage_service: Run init_server inside seastar::async
This helps enabling more code inside it.
2015-08-18 17:06:02 +08:00
Asias He
63d32fb681 storage_service: Enable remove_endpoint in bootstrap 2015-08-18 17:06:02 +08:00
Asias He
c7d2d07fc1 storage_service: Kill one FIXME for is_replacing 2015-08-18 17:06:02 +08:00
Asias He
7a0bc19c98 storage_service: Enable set_bootstrap_state and friends.
It is enabled in system_keyspace now.
2015-08-18 17:06:02 +08:00
Asias He
63a577c34c tests/cql_test_env: Init system_keyspace's local_cache
Soon storage_service will access it, we need to init it.
2015-08-18 17:06:02 +08:00
Asias He
7f98a89968 db/system_keyspace: Introduce init_local_cache 2015-08-18 17:06:02 +08:00
Avi Kivity
583d3b8438 Merge "Implement token and bootstrap functions from system keyspace" from Glauber
Fixes #138
2015-08-18 10:56:45 +03:00
Raphael S. Carvalho
2608427469 sstables: add support to range tombstone of a clustered row
Range tombstone for a clustered row wasn't supported, so an assert
to remember that was being triggered.
Testcase was added.

Fixes #158.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-08-18 10:41:25 +03:00
Glauber Costa
4cfe7de292 schema: correctly compound collections
We are currently using the ColumnToCollectionType wrongly: we are wrapping
by that string to every collection. But that is not how Origin operates: a single
ColumnToCollectionType hosts all collections a schema has.

Funny enough, sstable2json seems to work all right without any comparator - and
that is how it worked before, but when a comparator is present, it expects it to
abide by what Origin expects. That causes us to crash.

Fixes #148

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-18 10:40:04 +03:00
Glauber Costa
0177c7fed1 system keyspace: implement get_bootstrap_state
To avoid spreading the futures all over, we will resort to a cache with this,
the same way we did for the dc/rack information.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 11:03:37 -07:00
Glauber Costa
20590db87f system keyspace: implement set_bootstrap_state
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 11:03:37 -07:00
Glauber Costa
8a50534119 system keyspace: implement get_saved_tokens
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 11:03:37 -07:00
Glauber Costa
6a682d0e49 storage_service: futurize get_tokens
Because all its users are already futurized, this is actually an easy one.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 11:03:37 -07:00
Glauber Costa
bebb2abe4b system keyspace: factor out local_cache start code
It will now be used for other values as well.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 11:03:36 -07:00
Glauber Costa
229ce6cd85 dht: provide a from_sstring method
Only the partitioner knows how to convert a token to a sstring. Conversely,
only the partitioner can know how to convert it back.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 11:03:35 -07:00
Glauber Costa
5f807784bf dht: fix to_sstring methods to account for min tokens
Right now, we are converting the _data part of the token to a sstring, which
may be latter stored somewhere - in a system sstable, for instance. Later on,
we will have to get it back, but the way the code currently stands, we will get
undefined results for min and max tokens, since they have the _data field
empty.

For murmur3, strictly speaking, the correct solution would be to change
long_token to account for that. However, when we compare values, we already do
kind comparations explicitly. Inserting them there would only make that
operation branchier == costlier, which being a very common one, we don't want
to.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 10:23:19 -07:00
Glauber Costa
6fcbb3570e murmur3 partitioner: explicitly use int64_t instead of long
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-17 10:19:52 -07:00
Gleb Natapov
6b1669468a Fix short read problem.
Fix https://issues.apache.org/jira/browse/CASSANDRA-2643 same way
Origin does it: if short read is detected retry with bigger limit and
check again.
2015-08-17 18:11:26 +03:00
Gleb Natapov
d7b1146080 Include trailing tombstones in mutation when enforcing row_limit
It is how Origin deals with https://issues.apache.org/jira/browse/CASSANDRA-8933
and since we are going to implement same short read protection algorithm
as origin we need same behaviour here too.
2015-08-17 18:11:25 +03:00
Avi Kivity
608c0b8460 Merge "initial work on compaction manager API" from Rapahel 2015-08-17 17:24:13 +03:00
Calle Wilund
8f0f4e7945 Commitlog: do more extensive dir entry probes to determine type
Since directory_entry "type" might not be set.
Ensuring that code does not remain future free or easy to read.

Fixes #157.
2015-08-17 16:56:31 +03:00
Avi Kivity
932ddc328c logalloc: optimize current_allocation_strategy()
This heavily used function shows up in many places in the profile (as part
of other functions), so it's worth optimizing by eliminating the special
case for the standard allocator.  Use a statically allocated object instead.

(a non-thread-local object is fine since it has no data members).
2015-08-17 16:51:10 +03:00
Avi Kivity
29219fb31a Merge "Fixes for tuple types" from Paweł
"This patchset contains fixes to tuple types implementation necessary
to make them work properly. That includes using fully qualified class
name instead of CQL3 type name internally (just like it is done for
every other type), fixed bug with accessing vector that may be already
moved away and adding support for tuples in transport::type_codec."

Fixes #147.
2015-08-17 16:35:08 +03:00
Paweł Dziepak
4e3f81ee62 tests/cql3: test_tuples: test table creation as well
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-08-17 14:44:08 +02:00
Paweł Dziepak
944d0e5366 transport: encode tuple types properly
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-08-17 14:42:21 +02:00
Paweł Dziepak
f846eb2032 types: tuple: fix std::move() in constructor
In an expression like:

  tuple_type_impl(make_name(types), std::move(types));

the order in which arguments are evaluated is unspecified and it
is possible that make_name() is called with types already moved
away.

This is fixed by using initialization list (for which order of
evalutaion is specified). Unfortunately, this also requires some code
duplication.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-08-17 14:25:39 +02:00
Paweł Dziepak
08b2c5801d types: tuple: use fully qualified class name as type name
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-08-17 14:24:17 +02:00
Paweł Dziepak
9c33e1afcf types: add is_tuple()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-08-17 14:24:04 +02:00
Avi Kivity
54a9191746 Merge seastar upstream
* seastar 44e35a4...69edf16 (1):
  > shared_ptr: inline lw_shared_ptr destructor
2015-08-17 13:12:48 +03:00
Avi Kivity
b27f9b3b01 Merge rpm updates from Takuya 2015-08-17 11:22:25 +03:00
Avi Kivity
a8f957b692 Merge "CQL3 tuples cleanup" from Paweł
"These are some minor fixes and improvements for issues pointed out
during review."
2015-08-17 10:51:58 +03:00
Avi Kivity
52b58fca8a Merge "streaming fix for repair" from Asias
"This series fix the issue found by Nadav in commit "repair: track ongoing
repairs"."
2015-08-17 10:40:01 +03:00
Paweł Dziepak
fc7062f5d2 cql3: tuples: get rid of lambda in std::transform()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-08-17 09:26:19 +02:00
Avi Kivity
401725c446 Merge seastar upstream
* seastar f1b4290...44e35a4 (4):
  > future:then()/then_wrapped() simplification and optimization
  > futurize<>::apply() - make noexcept
  > future::forward_to() - move out exception
  > future::then() - throw correct exception
2015-08-17 10:18:51 +03:00
Avi Kivity
9caea0c86f Merge "Clean up CQL query options" from Pekka
"Clean up various issues with the query_options class to make it easier
to work on."
2015-08-17 10:18:18 +03:00
Paweł Dziepak
3be8e3638e cql3: add missing std::move() in tuples::in_value()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-08-17 09:11:53 +02:00
Paweł Dziepak
b74c7824bb cql3: reserve vector capacity in tuple::in_value constructor 2015-08-17 09:07:52 +02:00
Takuya ASADA
36ef69c1d0 dist: Fixes on spec file
Fix Summary, added Conflicts/Provides, specified release mode on building stage.
2015-08-17 16:02:25 +09:00
Takuya ASADA
2e62f4452f dist: add limits.conf for scylla-server 2015-08-17 16:02:25 +09:00
Takuya ASADA
760a1345e1 dist: add a script to build rpm 2015-08-17 16:02:25 +09:00
Pekka Enberg
ed92f8516c cql3/query_options: Fix formatting
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-17 09:48:59 +03:00
Pekka Enberg
b165d22443 cql3/query_options: Move implementation to source file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-17 09:48:59 +03:00
Pekka Enberg
401c3668a4 cql3/query_options: Remove ifdef'd code
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-08-17 09:48:58 +03:00