Commit Graph

180 Commits

Author SHA1 Message Date
Asias He
1da37796bc gossip: Fix do_shadow_round
We sleep storage_service_ring_delay until we abort due to failing to
talk to a seed node. We should retry sending GossipDigestSyn message,
instead of sending it once.

With this, we can start the seed node and normal node in a script like
below, without any sleep between.

./scylla --listen-address 127.0.0.1
./scylla --listen-address 127.0.0.2

This is useful for testing.
2015-08-03 10:05:42 +03:00
Asias He
eb79a119bf gossip: Move code from gms/gossip_digest_syn.hh to source file 2015-07-31 10:43:40 +08:00
Asias He
175ccfe49d gossip: Move code from gms/gossip_digest_ack2.hh to source file 2015-07-31 10:43:40 +08:00
Asias He
3ad6d1309f gossip: Move code from gms/gossip_digest_ack.hh to source file 2015-07-31 10:43:40 +08:00
Asias He
6398bb4bdc gossip: Move code from gms/endpoint_state.hh to source file 2015-07-31 10:43:40 +08:00
Asias He
b1a8353e61 gossip: Drop gms/token_serializer.hh
It is unused.
2015-07-31 10:43:40 +08:00
Asias He
a95213e81e gossip: Kill gms/gms.cc
All headers of gms/* are included. No need to include them all in gms.cc now.
2015-07-31 10:43:40 +08:00
Asias He
e074b1b7f8 gossip: Move operator<< of gossip_digest_ack2 to gossip_digest_ack2.cc 2015-07-31 10:43:39 +08:00
Asias He
ca5eea7fad gossip: Move operator<< of gossip_digest_ack to gossip_digest_ack.cc 2015-07-31 10:43:39 +08:00
Asias He
76efae87b5 gossip: Move operator<< of gossip_digest_syn to gossip_digest_syn.cc 2015-07-31 10:43:39 +08:00
Asias He
d850e4ef31 gossip: Move _the_gossiper to gossiper.cc 2015-07-31 10:43:39 +08:00
Asias He
4390b448a2 gossip: Move _the_failure_detector to failure_detector.cc
We will kill gms/gms.cc soon.
2015-07-31 10:43:39 +08:00
Asias He
d4dce4aa43 gossip: Fix is_enabled 2015-07-31 10:43:39 +08:00
Asias He
5d08bd030c gossip: Kill one more unimplemented in shutdown 2015-07-31 10:43:39 +08:00
Asias He
efbdf428fc gossip: Remove commented code of resetVersion and destroyConnectionPool
Our messaging service is completely different. No need to reset version
or destroy connection pool.
2015-07-31 10:43:39 +08:00
Asias He
43c7ff217d gossip: Kill two warn unimplemented
It is implemented now.
2015-07-31 10:43:39 +08:00
Asias He
f326704240 gossip: Drop unused code 2015-07-29 15:45:46 +08:00
Asias He
782b78a4c7 gossip: Introduce handle_ack_msg helper
It is shared by shadow-round and non-shadow-round.
2015-07-29 15:16:01 +08:00
Asias He
2ab3033d5d gossip: Fix do_shadow_round
Add the sleep logic.
2015-07-29 15:16:01 +08:00
Asias He
d38deef499 gossip: Kill a FIMXE for knows_version 2015-07-29 11:25:38 +08:00
Asias He
471a964d8e gossip: Kill a FIXME for clone_with_higher_version 2015-07-29 11:15:52 +08:00
Asias He
d799d1aa8f gossip: Implement the missing sleep logic 2015-07-29 11:13:35 +08:00
Asias He
1a6f7cf2aa gossip: Fix assassinate
- Use seastar::async to simplify the sleep logic.
- Futurize assassinate so that future is ready when assassination finishes.
2015-07-29 10:57:23 +08:00
Asias He
acd6e6268f gossip: Fix storage_service_value_factory
We have value_factory in storage_service now. Use it.
2015-07-29 10:06:43 +08:00
Asias He
33d3fcf7db gossip: Add set_last_processed_message_at() helper
Set time_point to now by default.
2015-07-29 09:54:29 +08:00
Asias He
65232edfe8 gossip: Move swagger API to source file 2015-07-29 09:49:28 +08:00
Asias He
0ce3d89a85 gossip: Switch to use chrono for time operation
This is a long-awaited cleanup. Gossiper code runs every second, it is
not performance sensitive, so it does not make much sense to stick to
lowres db_clock, use high_resolution_clock instead.
2015-07-28 14:59:44 +03:00
Asias He
74b281b92a gossip: Fix QUARANTINE_DELAY initialization
Dependencies between static variables don't work if they're in different
translation units.

I see in gossiper's constructor, QUARANTINE_DELAY is still 0.

Make it a function. It is nicer to make it inline, but I don't want to
pull storage_service.hh into gossiper.hh.
2015-07-27 11:29:13 +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
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
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
Pekka Enberg
67f4b55b16 gms/gossiper: Fix is_gossip_only_member() logic
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 11:57:00 +03:00
Pekka Enberg
91e601ed11 gms/gossiper: Make is_gossip_only_member() public
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 11:57:00 +03:00
Pekka Enberg
bc4c04a2ab gms: Make endpoint_state::get_application_state() const
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 11:57:00 +03:00
Asias He
ff457b018a gossip: Enable logger in gossiper class 2015-07-21 22:56:24 +08:00
Asias He
b16eb27c58 gms/versioned_value: Fix rpcaddress 2015-07-21 17:00:15 +08:00
Asias He
ba04f0bc6b gms/versioned_value: Fix network_version 2015-07-21 17:00:15 +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
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
Glauber Costa
d43933e642 gms: add addr method to inet_addr
Because the cql types deal with a raw inet address and not the gms container, we need
a method to fetch it

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-09 11:27:45 -04:00