Commit Graph

53948 Commits

Author SHA1 Message Date
Avi Kivity
1e481f91b7 httpd: stop active connections on shutdown
Keep a list of all active connections, and shutdown the socket when
we're stopping.  Wait for all connections to remove themselves before
returning.
2015-06-16 12:03:00 +03:00
Avi Kivity
56abdc4632 httpd: implement stop() for http_server
Aborts active accept() calls and shuts down.  Active connections are
still leaked.
2015-06-16 12:02:58 +03:00
Avi Kivity
8f9d3dc9b2 httpd: reformat main.cc 2015-06-16 12:02:32 +03:00
Avi Kivity
8dc71b7b8b net: wire up connected_socket shutdown methods and expose to user 2015-06-16 12:02:32 +03:00
Avi Kivity
e59c7d9f1f net: provide shutdown methods for the native tcp stack 2015-06-16 12:02:32 +03:00
Avi Kivity
74e9a897b7 net: add shutdown methods for posix connected_socket
We can simply ask the kernel to shutdown for us, and it will propagate
exceptions to callers.
2015-06-16 12:02:31 +03:00
Avi Kivity
661d459fff net: wire up server_socket shutdown method and expose to callers 2015-06-16 12:02:30 +03:00
Avi Kivity
587013a611 net: add shutdown() method to tcp listener 2015-06-16 11:54:44 +03:00
Avi Kivity
9f7e31494c posix stack: add methods to shut down a listening socket
Anyone waiting on accept() will receive an exception.
2015-06-16 11:53:30 +03:00
Nadav Har'El
49efd2a9ed build: strip all tests
[I'm sending this patch to Urchin, but it will also apply (with different
description, to Seastar]

This patch saves about 12 GB of disk space in Urchin's build directory.

Our debugging information is absurdly huge, and added to every single
executable we generate. This is most noticable in tests - we currently
have about 60 test executables, and each one contains a copy of all
this debug information.

This patch creates all test executables - whether debug or release mode -
stripped. When a user encounters a failing test he wants debug information
for (for gdb or the sanitizer), he can trivially relink it unstripped,
with a command like:

	ninja build/debug/tests/urchin/sstable_test_g

(note the added "_g"). This links the already existing object files
(which still have their debug information), which takes a few seconds.

On my machine, this patch reduces the Urchin build directory from about
22 GB to less than 10 GB. The build/release/tests directory drops from
6.8 GB to just 0.6 GB! The build/debug/tests directory is still huge (6 GB)
and could be improved further, but is also less than half of what it used
to be.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-06-16 11:41:26 +03:00
Asias He
2682d442aa storage_service: Add stop() needed by distributed<> 2015-06-16 15:45:15 +08:00
Asias He
7b6ab5aaa1 storage_service: Implement gossip_snitch_info
Now we have rack and datacenter info injected into gossip.

{ 3 : Value(rack1,9) }  { 4 : Value(datacenter1,11) }
2015-06-16 15:44:30 +08:00
Asias He
13f2292596 storage_service: Use fb_utilities::get_broadcast_address 2015-06-16 15:08:44 +08:00
Avi Kivity
f0ae995817 distributed: document 2015-06-15 23:17:06 +03:00
Avi Kivity
31d3801215 reactor: wire up shutdown() on pollable_fd 2015-06-15 16:38:52 +03:00
Avi Kivity
2a24e8f5ca reactor: add methods to abort futures waiting on fd event
If they're waiting, blow them away with an exception, and unsubscribe the
events from epoll.
2015-06-15 16:37:43 +03:00
Avi Kivity
1b99b1f170 queue: add method to abort a queue
Destroy all queued objects, blow waiting readers or writers with an
exception.
2015-06-15 16:35:48 +03:00
Avi Kivity
c653cc1910 posix: wire up shutdown() API 2015-06-15 16:35:22 +03:00
Shlomi Livne
3e31c56ed9 Support snitch registration on long and short format
Snitches can be inialized based on short and long name format. In case a
short name is provided the "org.apache.cassandra.locator." is
contacenated to it. Out solution is simpler with double regitration.
Default cassandra.yaml includes "endpoint_snitch: SimpleSnitch"

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-06-15 15:33:40 +03:00
Shlomi Livne
84da02d67f Enable endpoint_snitch
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-06-15 15:32:13 +03:00
Avi Kivity
743b6efd54 Merge "initial mutation clustering" from Gleb 2015-06-15 13:25:01 +03:00
Gleb Natapov
969134280a initial mutation clustering code 2015-06-15 12:53:10 +03:00
Gleb Natapov
7cee40bff2 add frozen_mutation serializer 2015-06-15 12:51:09 +03:00
Gleb Natapov
8fd7c45d4c make get_replication_factor a virtual function of abstract_replication_strategy 2015-06-15 12:51:09 +03:00
Gleb Natapov
5f3f8e641f add token_metadata::pending_enpoints_for() stub function 2015-06-15 12:51:09 +03:00
Gleb Natapov
a4c6b4a53f drop frozen_mutation::from_bytes() in favor of explicit constructor 2015-06-15 12:51:09 +03:00
Gleb Natapov
0657396fcb message: add generic std::vector serializer 2015-06-15 12:51:09 +03:00
Gleb Natapov
2d409250f2 remove ad-hoc token_metadata creation 2015-06-15 12:51:09 +03:00
Gleb Natapov
c418f9496b fix cql_query_test to initialize service that will be needed by clustering 2015-06-15 12:51:09 +03:00
Gleb Natapov
c500823d35 move init_storage_service out of main.cc 2015-06-15 12:51:04 +03:00
Pekka Enberg
e12cbb1836 db/legacy_schema_tables: Use async() for merge_schema()
Convert the merge_schema() function to use async() to make the code
easier to read and write.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-06-15 12:50:07 +03:00
Gleb Natapov
238a9d5d30 move init_messaging_service from main 2015-06-15 12:48:00 +03:00
Asias He
d2a9ea7ca6 storage_service: Fix Unable to contact any seeds
Sleep before do bootstrap. This code was not converted from Origin.

With this we can start multiple nodes simultaneously.

./build/release/seastar -c 1 -m 128M --rpc-address 127.0.0.1
--listen-address 127.0.0.1 --seed-provider-parameters 127.0.0.1
--datadir `pwd`/tmp/1 --commitlog-directory `pwd`/tmp/1 2>&1 | tee
/tmp/out1 &

./build/release/seastar -c 1 -m 128M --rpc-address 127.0.0.2
--listen-address 127.0.0.2 --seed-provider-parameters 127.0.0.1
--datadir `pwd`/tmp/2 --commitlog-directory `pwd`/tmp/2 2>&1 | tee
/tmp/out2 &

./build/release/seastar -c 1 -m 128M --rpc-address 127.0.0.3
--listen-address 127.0.0.3 --seed-provider-parameters 127.0.0.1
--datadir `pwd`/tmp/3 --commitlog-directory `pwd`/tmp/3 2>&1 | tee
/tmp/out3 &

./build/release/seastar -c 1 -m 128M --rpc-address 127.0.0.4
--listen-address 127.0.0.4 --seed-provider-parameters 127.0.0.1
--datadir `pwd`/tmp/4 --commitlog-directory `pwd`/tmp/4 2>&1 | tee
/tmp/out4
2015-06-15 12:30:02 +03:00
Avi Kivity
ca6e4e7d10 Merge seastar upstream 2015-06-15 11:45:00 +03:00
Avi Kivity
a4c711afd4 future: fix future<>::get0()
Empty tuples don't have a first element.
2015-06-15 11:43:38 +03:00
Avi Kivity
ddaaa315c8 future: add a get0() helper to get the first/only member of the result tuple
Reviewed-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-06-15 11:29:02 +03:00
Avi Kivity
ba24552efe Merge branch 'master' of github.com:cloudius-systems/urchin into db 2015-06-15 11:00:47 +03:00
Avi Kivity
446731cf88 Merge "column family API"
Column family API, from Amnon.
2015-06-15 10:50:23 +03:00
Tomasz Grabiec
c53ed98731 Merge branch 'shlomi/enable_cluster_via_config' from seatar-dev.git 2015-06-15 09:22:41 +02:00
Asias He
1d0b78d80f gossip: Fix capture by ref on a stack variable 2015-06-15 10:08:17 +03:00
Avi Kivity
053566b3e9 deleter: document 2015-06-15 08:47:44 +03:00
Avi Kivity
1769cb4520 temporary_buffer: document 2015-06-14 23:52:25 +03:00
Avi Kivity
5be417175e Merge "snitch creation"
From Vlad:

"Currently database always created a SimpleSnitch and ignores the corresponding parameter
provided by the user. This series fixes this situation:
   - Changes the snitch creation interface to comply the Java-like interface that
     has already been used in a topology_strategy classes family.
   - Fix all the places where a SimpleSnitch has been created ignoring the user configuration."
2015-06-14 17:59:15 +03:00
Avi Kivity
06031ea273 Merge seastar upstream 2015-06-14 17:47:32 +03:00
Avi Kivity
25420a6fdf core: add support for --cpuset command line option
Syntax: [cpu-]cpu(,[cpu-]cpu=)...
Default: all processors
2015-06-14 16:11:31 +03:00
Avi Kivity
f85a2b48bb resource: support using only a subset of a machine's processors
This is useful for running multiple seastar applications on the same
machine, for testing purposes.
2015-06-14 16:10:21 +03:00
Gleb Natapov
50b18a56cd test: add semaphore test 2015-06-14 16:03:46 +03:00
Gleb Natapov
361db498d1 semaphore: add wait() with timeout support 2015-06-14 16:02:19 +03:00
Gleb Natapov
f19ba7c334 Add timer move constructor 2015-06-14 16:02:18 +03:00
Gleb Natapov
1b2bf57a2b move timer out of reactor.hh to its own header 2015-06-14 16:02:16 +03:00