Commit Graph

4960 Commits

Author SHA1 Message Date
Asias He
94e34cde64 storage_service: Drop ss_debug 2015-07-21 22:56:24 +08:00
Asias He
72a8c27b56 storage_service: Enable logger 2015-07-21 22:56:24 +08:00
Avi Kivity
2c8a994cba Merge "Update system.peers table" from Asias 2015-07-21 13:03:40 +03:00
Avi Kivity
8ba5d19db5 db: avoid ubsan false-positive in query_state move constructor
The value is moved before initialization due to a do_with().  It's harmless,
but better to silence the warning.
2015-07-21 12:19:54 +03:00
Avi Kivity
c84fc789c5 cql3: avoid use-after-free of stack variable in create_keyspace_statement
Capture it by value.
2015-07-21 12:19:19 +03:00
Asias He
344d8e95d1 storage_service: Update system.peers table
Before:

   cqlsh> SELECT * from system.peers ;
   cqlsh:system> SELECT * FROM system.peers ;
    peer | data_center | host_id | preferred_ip | rack | release_version | rpc_address | schema_version | tokens
   ------+-------------+---------+--------------+------+-----------------+-------------+----------------+--------
   (0 rows)

After:

   cqlsh> SELECT * from system.peers ;
    peer      | data_center | host_id                              | preferred_ip | rack  | release_version | rpc_address | schema_version | tokens
   -----------+-------------+--------------------------------------+--------------+-------+-----------------+-------------+----------------+--------
    127.0.0.2 | datacenter1 | 7daa116a-03d0-4623-8084-f213701f3136 |         null | rack1 |      urchin_1_0 |   127.0.0.2 |           null |   null
   (1 rows)
2015-07-21 17:10:56 +08:00
Asias He
d8a281e811 storage_service: Use broadcast_address as broadcast_rpc_address for now
Until we can get it from the config system.

It is better than a empty address.
2015-07-21 17:00:15 +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
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
268f2fa8a1 db/system_keyspace: Change host_id to uuid_type 2015-07-21 17:00:15 +08:00
Avi Kivity
c1e25e40f0 Merge "Streaming updates" from Asias
"With this series:

1) We can verify that data from Node A to Node B are streamed correctly.

2) Session completion are handled now.

Node A:
[Stream #08a2d480-2f7b-11e5-ae28-000000000000] Session with 127.0.0.2 is complete
[Stream #08a2d480-2f7b-11e5-ae28-000000000000] All sessions completed

Node B:
[Stream #08a2d480-2f7b-11e5-ae28-000000000000] Session with 127.0.0.1 is complete
[Stream #08a2d480-2f7b-11e5-ae28-000000000000] All sessions completed"
2015-07-21 11:29:26 +03:00
Avi Kivity
4e662a4512 build: figure out ninja executable more cleanly 2015-07-21 11:26:26 +03:00
Asias He
19f46fdbe1 streaming: Remove redundant debug log info 2015-07-21 16:12:54 +08:00
Asias He
93f17024a8 streaming: Fix a logger printout
Before:

[Stream #136c5310-2f7a-11e5-87df-000000000000 ID#0]
[Stream #136c5310-2f7a-11e5-87df-000000000000, ID#0]

After:

[Stream #136c5310-2f7a-11e5-87df-000000000000 ID#0]
[Stream #136c5310-2f7a-11e5-87df-000000000000 ID#0]
2015-07-21 16:12:54 +08:00
Asias He
0e5fa35bd2 streaming: Register to stream_manager in create_and_register 2015-07-21 16:12:54 +08:00
Asias He
fc718dc87d streaming: Set up dst_cpu_id in PREPARE_MESSAGE hanlder 2015-07-21 16:12:54 +08:00
Asias He
ad86f5ea6e streaming: Fix get_or_create_host_data
It is always creating a new host_streaming_data which is incorrect.
2015-07-21 16:12:54 +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
6712e9404e streaming: Implement session completion logic 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
f9109c33ba streaming: Implement stream_transfer_task completion logic 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
ccb32ceec5 streaming: Add stream_transfer_task::complete 2015-07-21 16:12:54 +08:00
Asias He
34e33a9afe streaming: Wire up handle_session_complete and friends 2015-07-21 16:12:54 +08:00
Asias He
1f5feee5f2 streaming: Implement stream_result_future::handle_progress 2015-07-21 16:12:54 +08:00
Asias He
d74e414d09 streaming: Implement stream_result_future::handle_session_complete 2015-07-21 16:12:54 +08:00
Asias He
5e6f84cba8 streaming: Implement stream_result_future::handle_session_prepared
Instead of playing the game of casting between stream_event and derived
class. We overload handle_stream_event with derived stream_event class.

virtual void handle_stream_event(session_complete_event event) {}
virtual void handle_stream_event(progress_event event) {}
virtual void handle_stream_event(session_prepared_event event) {}

Also, make the virtual function non pure virtual, so user can override
the interested event only without defining all of the three.
2015-07-21 16:12:54 +08:00
Asias He
5ff5abbe2a streaming: handle_stream_event should be public 2015-07-21 16:12:54 +08:00
Asias He
d574e6e3c8 streaming: Rename getTotalFilesToSend to get_total_files_to_send 2015-07-21 16:12:54 +08:00
Asias He
f20b281e1c streaming: Update comments in stream_session::prepare
To make things a bit clear. Note: In Origin, prepare() can be called by
both initiator and follower.
2015-07-21 16:12:54 +08:00
Asias He
9b8d542b35 streaming: Improve handler of prepare_message from follower
Upon receiving of the prepare_message message from the follower,
msg.requests can only be empty. Don't bother look at the requests.
2015-07-21 16:12:54 +08:00
Asias He
d9b7cb4142 streaming: Enable logger in stream_result_future 2015-07-21 16:12:54 +08:00
Asias He
2e8b34dd9c streaming: Enable logger in stream_coordinator
Move connect_all_stream_sessions to source first.
2015-07-21 16:12:54 +08:00
Asias He
2dac3306a0 streaming: Enable more loggers in stream_session 2015-07-21 16:12:54 +08:00
Asias He
8561315cf2 streaming: de-thread_local-ize logger 2015-07-21 16:12:54 +08:00
Asias He
521df14240 streaming: Rename sstable_details to stream_details 2015-07-21 16:12:54 +08:00
Asias He
b53b8dfec8 streaming: Kill stream_reader
It is used by IncomingFileMessage's deserialize to read from network and
write int sstable. In urchin, we use messaging service, incoming
mutation is handler within the STREAM_MUTATION handler. No need for
stream_reader.
2015-07-21 16:12:54 +08:00
Asias He
8acf335f15 streaming: Kill stream_writer
In Origin, it is used by OutgoingFileMessage's serialize function to
write given section of the SSTable to network. In urchin, we send
mutaion directly in stream_transfer_task::start(). We can kill
stream_write now.
2015-07-21 16:12:54 +08:00
Asias He
7e365cb440 streaming: Handle cf_id does not exist case in STREAM_MUTATION handler 2015-07-21 16:12:54 +08:00
Asias He
69ce554a0f streaming: Init session when follower receives a PREPARE_MESSAGE 2015-07-21 16:12:54 +08:00
Asias He
9794fa1f97 streaming: Improve the test
Instead of streaming system.local table, create and stream user created
table.
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
Asias He
d6df358f2f tests: Bring back tests/urchin/message.cc
Change to use the new messaging_service API.
2015-07-21 16:12:54 +08:00
Avi Kivity
01923bc0c3 Merge "Make singular ranges transparent" from Tomasz 2015-07-21 10:46:27 +03:00
Nadav Har'El
2b337e33b4 build: strip all tests
This patch saves almost 20 GB (!!) of disk space in Urchin's build
directory, as well as a lot of memory during the link phase of the
build (which can be noticable on low-memory machines which leads to
slow swapping).

Because of C++'s extremely lengthy mangled names, and extremely numerous
functions, the debugging information generated for Seastar code is absurdly
large, and added to every single executable we generate. This is most
noticable in tests - we currently have over 30 tests (with hopefully much
more to come), each compiled into a separate excutable with its own copy of
all this debug information. Many of these executables are half a gigabyte,
each!

So 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/release/tests/urchin/sstable_test_g

note the added "_g". This links the already existing object files (which
still have their debug information, which takes just a fraction of a second.

On my machine, this patch reduces the Urchin built tests from about
27 GB to 8.1 GB. The build/release/tests directory drops from 10 GB to
just 0.6 GB! The build/debug/tests directory is still huge (7.5 GB),
although still smaller than what it was (17 GB). This remaining hugeness
is not because of the debug information, but because of the undefined-
behavior sanitizer (-fsanitize=undefined), which unfortunately adds a
huge data segment to each executable and I still don't know how to improve
on that. Nevertheless, it's still a significant reduction in space and will
be even more important as we write more tests.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-21 08:43:19 +03:00
Avi Kivity
bc8c2bee3c Merge "size-tiered strategy improvements" from Raphael 2015-07-20 18:47:18 +03:00
Raphael S. Carvalho
729b975438 tests: add testcase to size-tiered strategy
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-07-20 12:27:41 -03:00
Raphael S. Carvalho
8faa202e98 sstables: add function to return candidates using size-tiered strategy
That's helpful for the purpose of testing, and leveled compaction may
also end up using size-tiered compaction strategy for selecting
candidates.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-07-20 12:27:33 -03:00