Commit Graph

4827 Commits

Author SHA1 Message Date
Asias He
c19f5edefe messaging_service: Add wrapper for READ_MUTATION_DATA verb 2015-07-16 17:23:26 +08:00
Asias He
85c6dc0b7e messaging_service: Add wrapper for READ_DATA verb 2015-07-16 17:23:26 +08:00
Asias He
0707c15000 messaging_service: Add wrapper for MUTATION_DONE verb 2015-07-16 17:23:26 +08:00
Asias He
196c7d6f2b messaging_service: Add wrapper for MUTATION verb 2015-07-16 17:23:22 +08:00
Asias He
292ddd68c2 streaming: Delay adding wrappers for some stream verbs
It might be changed or be dropped since the upcoming change of streaming
code. It is not used at the moment.
2015-07-16 17:22:53 +08:00
Asias He
857fa5ccbb messaging_service: Add wrapper for STREAM_MUTATION verb 2015-07-16 17:19:51 +08:00
Asias He
1f6a76f2a0 messaging_service: Add wrapper for PREPARE_MESSAGE verb 2015-07-16 17:19:51 +08:00
Asias He
49b80535d9 messaging_service: Add wrapper for DEFINITIONS_UPDATE verb 2015-07-16 17:19:51 +08:00
Asias He
3e9d88e67c migration_manager: Do not use make_lw_shared in push_schema_mutation
The code does:

    auto fm = make_lw_shared<std::vector<frozen_mutation>>(schema.begin(), schema.end());
    return net::get_local_messaging_service().send_message_oneway(net::messaging_verb::DEFINITIONS_UPDATE,
         std::move(id), std::move(fm));

    ms.register_handler(net::messaging_verb::DEFINITIONS_UPDATE, [this] (std::vector<frozen_mutation> m) {
    ...
    }

We should not send a lw_shared_ptr, but std::vector<frozen_mutation>.

However, from Gleb:

   Well, this is not a bug, this is really cool (and to be honest
   unintended) feature of RPC. It is smart enough to detect that it is a
   smart pointer to an object and dereference it. But in this particular
   case there is not justification to use shared_ptr in the first place.

So, drop the lw_shared_ptr anyway.
2015-07-16 17:19:51 +08:00
Asias He
47503d0eaf messaging_service: Add wrapper for verbs used by gossip
Tested with tests/urchin/gossip.cc.
2015-07-16 17:19:51 +08:00
Asias He
ec0c1187ff messaging_service: Add out of line destructor 2015-07-16 17:19:50 +08:00
Avi Kivity
6257ef1d83 Merge "Add mutation::live_row_count()" from Tomasz 2015-07-16 10:32:11 +03:00
Avi Kivity
c6f889db03 Merge seastar upstream 2015-07-16 10:10:34 +03:00
Avi Kivity
2878bc887d Merge "Add rpc/rpc_types.hh" from Asias 2015-07-16 10:04:32 +03:00
Asias He
624388ae4b rpc: Move stats to rpc_types.hh
It will be needed by user does not want to include rpc.hh
2015-07-16 14:55:51 +08:00
Asias He
6ad04ff5e8 rpc: Introduce rpc/rpc_types.hh
Include rpc_types.hh instead of rpc.hh when no_wait_type and friends are
needed.
2015-07-16 14:55:50 +08:00
Raphael S. Carvalho
f7a1a5618b sstables: add missing #include guard
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-07-16 07:25:56 +03:00
Tomasz Grabiec
c304b83e8d messaging_service: Fix read_serializable()
The "v" parameter points to uninitialized object in RPC deserializer,
but db::serializer<>::read() variant with output parameter assumes it
is initialized.

Spotted by Gleb. Should fix #21.
2015-07-16 06:50:28 +03:00
Tomasz Grabiec
e065480341 tests: Add test for mutation::live_row_count() 2015-07-15 18:56:10 +02:00
Tomasz Grabiec
33ca07af33 mutation: Introduce live_row_count() 2015-07-15 18:56:10 +02:00
Tomasz Grabiec
446ba5bf27 mutation_partition: Extract row liveness checking logic to deletable_row::is_live() 2015-07-15 18:38:12 +02:00
Avi Kivity
f256243ebd memory: fix debug build break (statistics) 2015-07-15 18:17:49 +03:00
Avi Kivity
248aa4f55e reactor: wire up free memory and reclaim counters to collected 2015-07-15 18:09:13 +03:00
Avi Kivity
a597d37bc1 memory: add statistics for reclaim operations and free memory 2015-07-15 18:08:54 +03:00
Avi Kivity
3d3da0ceb0 Merge "No longer pass db naked pointer to multiple CF methods" from Glauber
"Cleanups to avoid passing pointers around some CF methods."
2015-07-15 18:03:01 +03:00
Glauber Costa
04c0fbcb8c remove calls to seal_active_memtable
It should not be called directly: externall callers should be calling flush()
instead.

To be sure it doesn't happen again, make seal_active_memtable private.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-15 10:24:20 -04:00
Glauber Costa
9c464aff9b database: clean up various APIs
In much of our column_families APIs, we need to pass a pointer to the database.
The only reason we do that, is so we can properly handle the commit log entries
after we seal the current memtables into sstables.

Now that we store a pointer to the commit log in the CF itself at the time it
is created, we no longer have to do it. As a result, the APIs are a lot
cleaner, with no gratuitous parameters.

My motivation for this was the flush method, but as a result, apply() also gets
cleaner.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-15 10:24:20 -04:00
Glauber Costa
ad46daa6aa column_family: add the commitlog as a parameter
When we create a column family, we can pass as an extra parameter, the
commitlog - or lack thereof. Because the commitlog is optional to begin with -
it won't exist if we don't call init_commitlog, we can have this to be empty
meaning no commit log.

The creation of a column family should be always done through
add_column_family. And if that is the case, we have the database's commitlog
right there and can get the pointer through the db. Only tests are not creating
the column family this way, and for them, it is fine.

We want to do that, because some column family operations will use the commit log.
Right now, they are forcing us to add parameters to APIs that would be much cleaner
without it. So while separation is good, this level of coupling is a net win as it
allows us to clean up some visible APIs.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-15 10:24:20 -04:00
Avi Kivity
5f88707d66 Merge "API: Replacing empty string to void" from Amnon 2015-07-15 14:52:15 +03:00
Amnon Heiman
83a64d75b5 Cleaning the gossiper API
This replaces the void method in the gossiper API to be json_void

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-15 14:20:28 +03:00
Amnon Heiman
b6fa2187af Cleanup the cache_service API
This replaces the void method in the cache service API to be json_void

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-15 14:20:28 +03:00
Amnon Heiman
2b0393525f Cleaning the hinted_handoff API
This replaces the void method in the hinted handoff API to be json_void

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-15 14:20:27 +03:00
Amnon Heiman
161c37d607 Cleaning the storage_proxy API
This replaces the void method in the storage proxy API to be json_void

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-15 14:20:27 +03:00
Amnon Heiman
14aafc83b6 API: Adding the get_host_id implementation to the API
This adds the implementation for the get host id API.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-15 14:19:16 +03:00
Amnon Heiman
40d0d58a50 Cleaning the storage_service API
This changes the return type of void API to json_void, for a cleaner
API.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-15 14:18:37 +03:00
Asias He
5d68f33fd1 messaging_service: Introduce wrapper for rpc::protocol::{client, server}
In order to make user of incomplete types of them, we need the wrappers.

Later, we can move the definition of the wrappers to .cc files.
2015-07-15 14:17:04 +03:00
Asias He
6191fcb62e messaging_service: Add wrapper for STREAM_INIT_MESSAGE verb
This patch serves as an example of how we can add wrappers for
ms.send_message and ms.register_handler.

When we convert all the users of them, we can make messaging_service.hh
do not include rpc.hh.
2015-07-15 14:17:04 +03:00
Tomasz Grabiec
cce2c648c5 Merge branch 'dev/gleb/for_urchin' from seastar-dev.git
Beginning of read implementation for range queries from Gleb.
2015-07-15 12:53:43 +03:00
Gleb Natapov
ed0faffd12 storage_proxy: beginning of read implementation for ranges queries 2015-07-15 12:41:38 +03:00
Gleb Natapov
6dc5b5ad76 storage_proxy: add resolver classes facilitate query resolving
The responsibility of the classes is to collect all results and do
reconciliation if needed.
2015-07-15 12:41:38 +03:00
Gleb Natapov
92a016fe9f add split() for range<ring_position> 2015-07-15 12:41:38 +03:00
Gleb Natapov
253ba71747 add comparison functions for ring_position
Two ring_positions are equal if tokens and keys are equal or tokens are
equal and one or both of them do not specify key. So ring_positions
without a key is a wildcard that equals any ring_positions with the same
token.
2015-07-15 12:41:31 +03:00
Tomasz Grabiec
c206699c9d Merge tag 'avi/logger-config/v1' from seastar-dev.git
Logger configuration from Avi.
2015-07-15 11:27:09 +02:00
Tomasz Grabiec
e1b4d0c29b Merge branch 'pdziepak/order-by-fixes/v2' from seastar-dev.git
"Fixes for ORDER BY clauses" from Pawel.

"The patches fix several issues in CQL3 frontend related to ORDER BY
clauses. Also, column component indexes are now handled properly and it
is possible to create tables with more than one column in clustering key."
2015-07-15 12:09:55 +03:00
Avi Kivity
ea691ef0cc Merge "Fixes for sstable::read_range_rows()" from Tomasz
First patch:
  Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-15 11:25:14 +03:00
Avi Kivity
d33a77e3be Merge "Improve messaging_service build time, part 1" from Asias
"This series moves as much code as possible to source file."
2015-07-15 10:31:02 +03:00
Asias He
3376b15157 messaging_service: Define _server as unique_ptr 2015-07-15 14:56:40 +08:00
Asias He
569a533d89 messaging_service: Switch rpc_protocol _rpc to std::unique_ptr<rpc_protocol> _rpc
Preparation for not including rpc.hh. Make it a pointer so we can use
rpc_protocol as incomplete type.
2015-07-15 14:56:37 +08:00
Asias He
91de9fe94f messaging_service: using rpc_protocol = rpc::protocol<serializer, messaging_verb> 2015-07-15 14:56:35 +08:00
Asias He
ef8cfb3db9 messaging_service: Move code of messaging_service to source file 2015-07-15 14:22:35 +08:00