Tomasz Grabiec
7563a76f4e
Merge tag 'avi/user_type/v2' from seastar-dev.git
2015-04-20 16:00:21 +02:00
Avi Kivity
08932571c1
tests: add user type literal test
2015-04-20 16:15:35 +03:00
Avi Kivity
b4e380b922
cql3: enable user_type literal grammar
2015-04-20 16:15:35 +03:00
Avi Kivity
c01515d291
cql3: convert user_types.hh to C++
2015-04-20 16:15:35 +03:00
Avi Kivity
55ec6bb923
tests: add user type test
2015-04-20 16:15:35 +03:00
Avi Kivity
3920ab18b2
cql3: enable user type grammar for field selection
2015-04-20 16:15:35 +03:00
Avi Kivity
f841a05475
cql3: convert selectable::with_field_selection to C++
...
Due to circular dependencies (selectable::with_field_selection ->
column_identifier -> selectable) a new header file was created.
2015-04-20 16:15:34 +03:00
Avi Kivity
fa961f1e5e
cql3: convert field_selector to C++
2015-04-20 16:15:34 +03:00
Avi Kivity
3179f05e12
db: implement user types (user_type_impl)
...
Like a C struct. Following origin, implemented as a tuple with an additional
vector of field names.
cql3_type integration deferred to the next patch.
2015-04-20 16:15:34 +03:00
Avi Kivity
3d38708434
cql3: pass a database& instance to most foo::raw::prepare() variants
...
To prepare a user-defined type, we need to look up its name in the keyspace.
While we get the keyspace name as an argument to prepare(), it is useless
without the database instance.
Fix the problem by passing a database reference along with the keyspace.
This precolates through the class structure, so most cql3 raw types end up
receiving this treatment.
Origin gets along without it by using a singleton. We can't do this due
to sharding (we could use a thread-local instance, but that's ugly too).
Hopefully the transition to a visitor will clean this up.
2015-04-20 16:15:34 +03:00
Asias He
1fb970459c
tests: Move tests/message.cc under tests/urchin
2015-04-20 15:30:07 +03:00
Avi Kivity
5d9ab992e8
Merge branch 'tgrabiec/schema-id-fixes-v2' of github.com:cloudius-systems/seastar-dev into db
...
Fixes related to column_family ID handling, from Tomasz.
2015-04-20 14:33:07 +03:00
Tomasz Grabiec
ef05c5b919
db: Lookup column family by UUID
...
It's a bit faster.
2015-04-20 12:12:55 +02:00
Tomasz Grabiec
ecab40bf97
commitlog: Write proper column family id
2015-04-20 12:12:55 +02:00
Tomasz Grabiec
4502f01581
thrift: Fix system_add_keyspace()
...
We should use the same UUID on each core for given column_family,
otherwise they will get different ids on each core.
2015-04-20 12:12:54 +02:00
Raphael S. Carvalho
20a3d5773b
sstables: add create_data()
...
Intended to create both index and data file based on current generation
of the sstables. This function is similar to open_data(), which only
opens both files, relying on their existence.
This function is a small step towards the write support of both data
and index files.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com >
2015-04-20 11:52:02 +03:00
Avi Kivity
64a651837a
Merge branch 'asias/message_single_port' of github.com:cloudius-systems/seastar-dev into db
...
Have messaging_service listen on a single port, from Asias.
Listening on multiple ports is no help for core-to-core communications.
2015-04-20 11:27:17 +03:00
Asias He
8ea0d94ece
message: Listen on single port
2015-04-20 16:11:01 +08:00
Asias He
b38dae4a2b
gossip: Dump failure detector info
2015-04-20 15:49:27 +08:00
Asias He
7e0a0c381f
gossip: Remove debug print message
2015-04-20 15:49:27 +08:00
Avi Kivity
8702fb1d13
Merge branch 'gleb/snitch' of github.com:cloudius-systems/seastar-dev into db
...
Some Snitch and StorageService related conversions, from Gleb.
2015-04-20 09:44:38 +03:00
Gleb Natapov
d75ccb0047
the very beginning of StorageService conversion
2015-04-20 09:18:23 +03:00
Gleb Natapov
d13422773d
copy StorageSrvice.java over
2015-04-20 09:18:23 +03:00
Gleb Natapov
c39af6dda0
gossip: store regular pointer to subscribers instead of shared one
...
Some subscribers are allocated statically, so it is a churn to make
shared pointers from them. And since registered subscribers have to be
unregister before been destroyed anyway there is no lifetime issue here
that require use of a smart pointer.
2015-04-20 09:18:23 +03:00
Gleb Natapov
02fb270fbe
token operator<<
2015-04-19 10:15:14 +03:00
Raphael S. Carvalho
fdf50ef643
sstables: add initial support to compression
...
Starting with LZ4, the default compressor.
Stub functions were added to other compression algorithms, which should
eventually be replaced with an actual implementation.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com >
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com >
2015-04-19 10:07:29 +03:00
Tomasz Grabiec
8d6b93d787
query: Document intention behind query results format
2015-04-19 10:07:02 +03:00
Avi Kivity
d691e4d1ff
Merge branch 'tgrabiec/cleanups' of github.com:cloudius-systems/seastar-dev into db
...
Remove obsolete files and fix code which used them, from Tomasz.
2015-04-19 09:53:49 +03:00
Tomasz Grabiec
9309a2ee6f
Remove obselete files
2015-04-17 15:08:06 +02:00
Tomasz Grabiec
979b671adf
cql3: Fix abstract_marker::raw::prepare()
...
It was using the wrong version of "collection_type(_impl)?" class.
2015-04-17 15:08:06 +02:00
Tomasz Grabiec
744d75e7f8
db: Move max_ttl from db/expiring_cell.hh to gc_clock.hh
2015-04-17 15:08:06 +02:00
Tomasz Grabiec
d87fbe9eb8
cql3: Fix references to obsolete collection types
...
The code was using the wrong version of list_type_impl and
collection_type_impl.
2015-04-17 15:08:06 +02:00
Tomasz Grabiec
5693f73b7a
db: Implement generate_legacy_id() properly
2015-04-17 14:22:29 +02:00
Tomasz Grabiec
af6cafd993
tests: Add test for name-based UUID generation
2015-04-17 14:22:29 +02:00
Tomasz Grabiec
957544f69b
utils: UUID_gen: Add support for name-based UUIDs (type 3)
2015-04-17 14:19:07 +02:00
Tomasz Grabiec
b79d2008c0
utils: UUID_gen: Fix comment about get_UUID()
...
UUID can hold not only type 1 UUIDs, but any UUID.
2015-04-17 14:19:07 +02:00
Avi Kivity
1aaa8c2f13
tests: fix cql_query_test tuple_test using a data_type on multiple cores
...
Pointed out by Tomek.
2015-04-16 18:39:43 +03:00
Avi Kivity
2c8b3a8e22
Merge branch 'tgrabiec/tuple_type_iterator' of github.com:cloudius-systems/urchin into db
...
Iterators for composites, from Tomasz.
2015-04-16 17:52:38 +03:00
Avi Kivity
edaf43f36a
Merge branch 'asias/gossip_v1' of github.com:cloudius-systems/seastar-dev into db
...
Gossip now actually talks among nodes, from Asias.
2015-04-16 17:00:24 +03:00
Tomasz Grabiec
bacede04b2
types: Expose component iterators in tuple_wrapper
...
This automatically exposes them in partition_key and clustering_key too.
The iterators return bytes_view to components.
For example:
schema s;
partition_key k;
for (bytes_view component : boost::make_iterator_range(key.begin(s), key.end(s))) {
// ...
}
2015-04-16 14:04:04 +02:00
Tomasz Grabiec
5ef11d113a
types: Improve code readability
2015-04-16 14:04:04 +02:00
Tomasz Grabiec
4c418ddef8
types: Use enum rather than bool in tuple_type template parameter
...
The 'bool' type doesn't hold any meaning on its own, which makes the
template instantiation sites not very readable:
tuple_type<true>
To improve that, we can introduce an enum class which is meaningful in
every context:
tuple_type<allow_prefixes::yes>
2015-04-16 14:57:21 +03:00
Asias He
6a2eed05fd
tests: Gossip around node load info
...
$ ./gossip --seed 127.0.0.1 --listen-address 127.0.0.1
$ ./gossip --seed 127.0.0.1 --listen-address 127.0.0.2
$ ./gossip --seed 127.0.0.1 --listen-address 127.0.0.3
After a few seconds, all the 3 nodes will know each other's load info
by gossip.
----------- endpoint_state_map dump beg -----------
ep=127.0.0.1, eps=EndpointState: HeartBeatState = generation = 1, version = 0, AppStateMap = { 1 : Value(0.5,1) }
ep=127.0.0.2, eps=EndpointState: HeartBeatState = generation = 1, version = 0, AppStateMap = { 1 : Value(0.5,1) }
ep=127.0.0.3, eps=EndpointState: HeartBeatState = generation = 1, version = 0, AppStateMap = { 1 : Value(0.5,1) }
----------- endpoint_state_map dump end -----------
2015-04-16 17:44:20 +08:00
Asias He
02f8c9d965
gossip: Add dump_endpoint_state_map for debug
2015-04-16 17:44:20 +08:00
Asias He
4abee75c04
gossip: Drop fail guard in mark_alive and apply_state_locally
2015-04-16 17:44:20 +08:00
Asias He
4cffb5513d
gossip: Drop unnecessary FIXME
2015-04-16 17:44:20 +08:00
Asias He
7f98644742
gossip: Fix send_gossip
...
Insert when local_ep_state_ptr is engaged not otherwise.
2015-04-16 17:08:19 +08:00
Asias He
eeafdf5815
gossip: Make gms::versioned_value::load static
...
We are supposed to call it without an instance.
We will convert other similar functions in follow up patches.
2015-04-16 17:03:46 +08:00
Asias He
d661827045
gossip: Fix get_broadcast_address
...
It is default to listen_address.
2015-04-16 17:01:52 +08:00
Asias He
adff3b9c79
gossip: Drop redundant print in heart_beat_state
2015-04-16 16:59:53 +08:00