Commit Graph

73 Commits

Author SHA1 Message Date
Asias He
5aedb7cfda messaging_service: Drop rpc client when rpc errors 2015-07-24 15:56:04 +08:00
Pekka Enberg
9e799cadd7 message/messaging_service: MIGRATION_REQUEST wrappers
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 11:57:00 +03:00
Pekka Enberg
49d9ac716d message/messaging_service.hh: Add missing do_with.hh include
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 11:24:37 +03:00
Asias He
b8be013934 messaging_service: Fix undefined reference to current_version
/usr/include/boost/format/feed_args.hpp:135: undefined reference to
`net::messaging_service::current_version'
2015-07-21 17:00:15 +08:00
Asias He
a010829f0c streaming: Add src_cpu_id parameter for PREPARE_MESSAGE verb
We need it to setup dst_cpu_id for the session of the follower.
2015-07-21 16:12:54 +08:00
Asias He
88aee5f51f streaming: Add register_complete_message and send_complete_message 2015-07-21 16:12:54 +08:00
Asias He
7f7c89951e streaming: Introduce STREAM_MUTATION_DONE verb
It is used when a stream_transfer_task sends all the mutations inside
the messages::outgoing_file_message's it contains to notify the remote
peer this stream_transfer_task is done.
2015-07-21 16:12:54 +08:00
Asias He
f2960a7cb0 streaming: Send plan_id for STREAM_MUTATION
We need this to find session associated with this frozen_mutation.
2015-07-21 16:12:54 +08:00
Asias He
fa2aee57ac utils: Move util/serialization.hh to utils/serialization.hh
Now we will not have the ugly utils and util directories, only utils.
2015-07-21 16:12:54 +08:00
Avi Kivity
8712796e0f Merge seastar upstream
Add messaging_service thunk from new-style serialization (free functions)
to old-style serialization (serializer methods).
2015-07-19 14:18:35 +03:00
Avi Kivity
0d68b4614d Merge seastar upstream
Rewrote messaging_service serialization for new non-deferring rpc
serialization.
2015-07-18 20:21:20 +03:00
Avi Kivity
c74e36c30e Merge branch 'master' of github.com:cloudius-systems/urchin into db
Conflicts:
	message/messaging_service.cc
	message/messaging_service.hh
2015-07-16 12:51:19 +03:00
Avi Kivity
1d4805236b messaging_service: don't include config.hh in .hh
config.hh changes rapidly, so don't force lots of recompiles by including it.

Need to place seed_provider_type in namespace scope, so we can forward
declare it for that.
2015-07-16 12:26:02 +03:00
Asias He
c75e89da88 messaging_service: Farewell rpc.hh 2015-07-16 17:23:26 +08:00
Asias He
48c895aa18 messaging_service: Move rpc_protocol_wrapper and friends to .cc file 2015-07-16 17:23:26 +08:00
Asias He
70236dbfa6 messaging_service: Add shard_info::get_stats helper
Will be used in api/messaging_service.cc.
2015-07-16 17:23:26 +08:00
Asias He
8c2cd037a2 messaging_service: Include rpc_types.hh
so that when we remove rpc.hh, types like rpc::closed_error will be
available.
2015-07-16 17:23:26 +08:00
Asias He
8bc59fb0b9 messaging_service: Move register_handler and send_message to .cc file 2015-07-16 17:23:26 +08:00
Asias He
b07ae77585 messaging_service: Add wrapper for READ_DIGEST verb 2015-07-16 17:23:26 +08:00
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
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
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
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
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
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
Asias He
c0335f38d6 messaging_service: Move code for shard_id into source file
Also, no reason to keep shard_id inside messaging_service class, move
it out.
2015-07-15 14:22:02 +08:00
Tomasz Grabiec
5b332c6f7c messaging_service: Add RPC call for mutation queries. 2015-07-12 12:54:38 +02:00
Tomasz Grabiec
82a61e92fa messaging_service: Use generic serializer adaptor for frozen_mutation 2015-07-12 12:54:38 +02:00
Tomasz Grabiec
0573844deb messaging_service: Add adaptors for types having db::serializer<> 2015-07-12 12:54:38 +02:00
Tomasz Grabiec
e865740abe messaging_service: Extract integral reading logic 2015-07-12 12:54:38 +02:00
Asias He
cdf50aa078 messaging_service: Add STREAM_MUTATION verb
It is used by streaming service to send frozen_mutation.
2015-07-09 15:52:28 +08:00
Asias He
c41872a64d messaging_service: Move serialization code frozen_mutation to source file 2015-07-09 15:52:27 +08:00
Asias He
a773c151a3 messaging_service: Move serialization code for sstring to source file 2015-07-09 15:52:27 +08:00
Asias He
ff5e80bd35 messaging_service: Move serialization code for messaging_verb to source file
It is *HUGE* pain to modify one line of the code in messaging_verb.hh and
wait like forever until urchin compiles.
2015-07-09 15:52:27 +08:00
Avi Kivity
dd29ac9593 Merge "cqlsh" from Glauber
System table Work to make cqlsh connect.
2015-07-07 19:33:23 +03:00
Glauber Costa
ba33af1a8d service: split messaging service initialization in two parts
The messaging service is initialized very early, before we have the
proxy or query processor initialized. It is mostly fine, except for
the fact that the messaging service also finishes the initialization
of the storage service. That part will issue queries agains the system
tables, (as soon as we support them), and need to happen later.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-07 11:38:22 -04:00
Avi Kivity
c77761a8b1 messaging: improve serialization for vectors
Various enable_if overload take precedence if a non-const frozen_mutation
is provided (instead of matching the const frozen_mutation& signature).

Provide a non-const frozen_mutation& signature to work around the issue.
2015-07-07 16:48:41 +03:00
Avi Kivity
228762421c messaging: support complex types in vector<> serialization
do_with() required a movable type, but the union U is not movable if the
vector element type is not, with out help from us.
2015-07-07 16:48:41 +03:00
Pekka Enberg
8a897f2979 message/messaging_service: Add versioning stubs
We only support one version for now but it's easier to convert callers
if the APIs are there.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-07 16:27:58 +03:00
Gleb Natapov
e5ab062f05 messaging: fix vector serialization
Hold on U with do_with since having it in capture is incorrect in case
lambda is moved.
2015-07-05 11:58:08 +03:00