Commit Graph

5142 Commits

Author SHA1 Message Date
Tomasz Grabiec
e5feff5d71 dht: ring_position: Switch to total ordering
range::is_wrap_around() and range::contains() rely on total ordering
on values to work properly. Current ring_position_comparator was only
imposing a weak ordering (token positions equal to all key positions
with that token).

range::before() and range::after() can't work for weak ordering. If
the bound is exclusive, we don't know if user-provided token position
is inside or outside.

Also, is_wrap_around() can't properly detect wrap around in all
cases. Consider this case:

 (1) ]A; B]
 (2) [A; B]

For A = (tok1) and B = (tok1, key1), (1) is a wrap around and (2) is
not. Without total ordering between A and B, range::is_wrap_around() can't
tell that.

I think the simplest soution is to define a total ordering on
ring_position by making token positions positioned either before or
after all keys with that token.
2015-07-24 16:08:41 +02:00
Tomasz Grabiec
2e845140e2 dht: ring_position: Implement less_compare() and equals() using tri_compare() 2015-07-24 16:08:41 +02:00
Tomasz Grabiec
7b30e8fcff dht: ring_position: Move definitions out of line 2015-07-24 16:08:41 +02:00
Tomasz Grabiec
1c562fcdb3 Merge tag 'asias/gossip/rejoin/v2'
From Asias: "
This pathset fixes:

- node rejoin issue
  Start node 1 and node 2, kill node 2, restart node 2.
  Now, node 1 can talk to node 2 correctly.

- node mark dead issue

- failure_detector sampling
"
2015-07-24 14:09:20 +03:00
Asias He
1547fa05a5 failure_detector: Simplify get_initial_value and get_max_interval 2015-07-24 19:01:49 +08:00
Asias He
64f8c6e498 failure_detector: Switch to use std::chrono::steady_clock
Instead of naked integer based time point value.
2015-07-24 18:55:21 +08:00
Asias He
bb2c30ed82 gossip: Fix QUARANTINE_DELAY
We have StorageService.RING_DELAY now, switch to use it.
2015-07-24 18:55:21 +08:00
Raphael S. Carvalho
70770c261b sstables: remove double percentage symbol from compaction log message
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-07-24 10:21:38 +02:00
Tomasz Grabiec
bcd639c8ba Merge branch 'penberg/cql-cleanups' from seastar-dev.git
CQL cleanups from Pekka.
2015-07-24 10:21:11 +02:00
Pekka Enberg
78840a690f cql3: Move ut_name implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Pekka Enberg
de6b38e316 cql3: Move column_identifier implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Pekka Enberg
872a7215b2 cql3: Separate column_identifier::raw class
Move column_identifier::raw class definition outside of
column_identifier class.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Pekka Enberg
1e5fad25d7 cql3: Move attributes implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Pekka Enberg
0e09b2769c cql3: Move abstract_marker implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Pekka Enberg
ca3690726a cql3: Remove unused cql3_row.hh
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Avi Kivity
4e58bfb197 Merge 2015-07-24 11:09:05 +03:00
Asias He
b01eeede1d gossip: Add more debug printouts
- for convict
- for send_gossip
2015-07-24 15:56:05 +08:00
Asias He
73bb690b40 failure_detector: Fix now unit in report 2015-07-24 15:56:05 +08:00
Asias He
9f1dc2877e failure_detector: Fix INITIAL_VALUE_NANOS 2015-07-24 15:56:05 +08:00
Asias He
1c2f5d5997 failure_detector: Add more log printout 2015-07-24 15:56:05 +08:00
Asias He
557f193737 gossip: Fix convict is_dead_state check
The logic in Origin is state.is_alive() && !is_dead_state(state).
2015-07-24 15:56:04 +08:00
Asias He
4e72b2a6b1 gossip: Fix mark_dead
We should change the state stored in endpoint_state_map, not local
variable.
2015-07-24 15:56:04 +08:00
Asias He
c3b77f499b failure_detector: Enable logger 2015-07-24 15:56:04 +08:00
Asias He
1eef40e9ae gossip: Add error handling for sending message 2015-07-24 15:56:04 +08:00
Asias He
b856d03338 gossip: Use logger.debug in dump_endpoint_state_map 2015-07-24 15:56:04 +08:00
Asias He
c0ff7feeb3 tests: Set logger level to trace for tests/urchin/gossip.cc 2015-07-24 15:56:04 +08:00
Asias He
5aedb7cfda messaging_service: Drop rpc client when rpc errors 2015-07-24 15:56:04 +08:00
Avi Kivity
bdb926b55e Merge seastar upstream 2015-07-24 10:54:18 +03:00
Pekka Enberg
7fe99de608 gms/gossiper: Enable more token_metadata::is_member() checks
Translate more is_member() checks like in commit 67f4b55 ("gms/gossiper:
Fix is_gossip_only_member() logic").

This hopefully cures #36.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-23 19:50:11 +02:00
Glauber Costa
6624dd7491 schema: add default value to compaction strategy class
Because we will do from and to sstring operations on it, it needs
a default value. The lack of it is causing our tests to fail.

This should have been included in the original patch but I have somehow
missed it. Sorry.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-23 20:34:20 +03:00
Avi Kivity
0ff7ed8a48 Merge "One stop per service" from Glauber
"Not all services define a stop method. All of them should."
2015-07-23 18:55:44 +03:00
Glauber Costa
4cd143de87 filter_tracker: define and call a stop method
All sharded services "should" define a stop method. Calling them is also
a good practice. For this one specifically, though, we will not call stop.
We miss a good way to add a Deleter to a shared_ptr class, and that would
be the only reliable way to tie into its lifetime.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-23 11:11:57 -04:00
Glauber Costa
b488b06fa4 cql_server: define and call a stop method
All sharded services "should" define a stop method. Calling them is also
a good practice.

Blindly calling it at exit is wrong, but it is less wrong than not calling
it at all, and makes it now equally as wrong as any of the other services.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-23 11:11:57 -04:00
Glauber Costa
60cdfa20c1 thrift_server: define and call a stop method
All sharded services "should" define a stop method. Calling them is also
a good practice.

Blindly calling it at exit is wrong, but it is less wrong than not calling
it at all, and makes it now equally as wrong as any of the other services.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-23 11:10:48 -04:00
Glauber Costa
f323551ebb thrift_server: make destructor out of line
The destructor depends on a lot of things (like the thrift lib classes), that
are not visible from the .hh. It works fine so far because nobody is trying to
destroy it explicitly either. But soon I will.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-23 10:57:53 -04:00
Gleb Natapov
dadd097f9c do not use boost::multiprecision::msb()
It is not available in boost older than 1.55.
2015-07-23 17:55:12 +03:00
Avi Kivity
bb3aef7fd9 Merge "Basic schema handling of compact strategy" from Glauber
"With this patchset, cqlsh's describe table command now work"
2015-07-23 16:47:29 +03:00
Avi Kivity
f413e137dd Merge seastar upstream 2015-07-23 16:35:28 +03:00
Avi Kivity
be32746c58 Merge "Handle Compact Storage" from Glauber
"This is my current proposal for Compact Storage tables - plus
the needed infrastructure.

Getting rid of the CellName abstraction allows us to simplify
things by quite a lot: now all we need is to mark whether or
not a table is composite, and provide functions to play the
role of the comparator when dealing with the strings."
2015-07-23 16:20:31 +03:00
Avi Kivity
2d2422b6b7 Merge 2015-07-23 16:19:41 +03:00
Tomasz Grabiec
5cb840ad09 Merge tag 'asias/tests/gossip_fix/v1' from seastar-dev.git
Gossip test fixes from Asias.
2015-07-23 16:16:46 +03:00
Pekka Enberg
b912c888f1 service/migration_manager: Fix logging by de-thread-localizing loggers
The migration_manager and migration_task logging is currently not
visible in the logs. Fix that by de-thread-localizing both loggers.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-23 16:16:14 +03:00
Avi Kivity
eea955723e Merge "Serialize query::range<token> in stream_request" from Asias 2015-07-23 16:06:33 +03:00
Tomasz Grabiec
3fd682de4b db/legacy_schema_tables: Fix dead lock in create table statement
merge_schema() was recursively calling itself, causing it to block
iself on a non-recursive lock.
2015-07-23 12:37:42 +02:00
Gleb Natapov
e41880fc66 drop reference to storage_proxy from read executors
Now when storage_proxy can be accessed globally there is no need to
waste memory to save its pointer in each read executor.
2015-07-23 12:32:21 +03:00
Gleb Natapov
00d4974cec storage_proxy: add logger
Uncomment exiting logging points.
2015-07-23 12:32:21 +03:00
Gleb Natapov
f122ee39b9 storage_proxy: return proper error codes to transport layer
Transport layer expects to get error code in an exception of type
exceptions::cassandra_exception. Fix code to use it as a base for
all user visible exceptions and put correct error code there.
2015-07-23 12:32:21 +03:00
Asias He
e558efc42c tests: Use time based generation_number number 2015-07-23 15:26:46 +08:00
Asias He
879ca5adaf tests: Fix tests/urchin/gossip.cc
After commit 67f4b55b16 "gms/gossiper: Fix is_gossip_only_member() logic",
storage_service is needed by gossip.

To fix, start storage_service in the test. Also, improve the
indentation.
2015-07-23 15:26:46 +08:00
Pekka Enberg
78ee9e7478 db/system_keyspace: Fix "peers" table "schema_version" column type
The column type of "schema_version" is set to UTF8 which results in the
following value conversion errors:

  storage_service: fail to update schema_version for 127.0.0.2: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_any_cast> > (boost::bad_any_cast: failed conversion using boost::any_cast)

Change the column type to UUID like in Origin. Fixes #35.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-23 09:37:32 +03:00