This patch introduce init.cc file which hosts all the initialization
code. The benefits are 1) we can share initialization code with tests
code. 2) all the service startup dependency / order code is in one
single place instead of everywhere.
The utils file will hold general modules, that need to be used by
multiple modules.
As a start, it holds the histogram definition.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Instead of trying to second-guess the seastar build system, always rebuild
libseastar.a. Specify restat = 1 so that binaries are only relinked if
something truly changed.
The idea is to reuse the same testing code on any mutation_source, for
example on memtable.
The range query test cases are now part of a generic mutation_source
test suite.
The functionality is similar to RuntimeMBean.getUptime() that's needed
in schema pulling logic.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
"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"
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.
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.
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>
stream_session::stream_session(inet_address peer_, inet_address connecting_,
int index_, bool keep_ss_table_level_)
: peer(peer_)
, connecting(connecting_)
, conn_handler(shared_from_this())
Calling shared_from_this() inside stream_session's constructor is
problematic. I got
Exiting on unhandled exception of type 'std::bad_weak_ptr': bad_weak_ptr
exceptions, with
auto session = std::make_shared<stream_session>(peer, connecting, size, _keep_ss_table_level)
Also, the logic in connection_handler is not very useful for us. The
sending and receiving of messages are handled using messaging_service.
There is no need to add another layer.
I tried our lw_shared_ptr, the compiler complained endless usage of
incomplete type stream_session. I can not include stream_session.hh
everywhere due to circular dependency.
For now, I'm using std::shared_ptr which works fine.
This patch series adds partial implementation of ByteOrderedPartitioner
and allows choosing it in configuration file.
While ByteOrderedPartitioner is generally not recommended it is used by
some tests in DTEST due to its order guarantees.
Mutation query differs from data query in that returns information
needed to reconcile data slice with that retruned by other data
sources.
There is a generic mutation_query() algorithm introduced, which can
work with any mutation_source.
database::query_mutations() is a shard-local interface for mutation
queries.
The reconcilable_result is introduced as a medium for mutation query
results. It piggy backs on frozen_mutation as a medium for
reconcilable data.
"Fix index name case sensitivity as per Origin commit 68be72f ("Fix
case-sensitivity of index name on CREATE/DROP INDEX") which addressed
CASSANDRA-8365.
Please note that the imported code is from "cassandra-2.2.0-rc2" tag
that points to the following commit:
ebc50d783505854f04f183297ad3009b9095b07e"
Reviewed-by: Glauber Costa <glommer@cloudius-systems.com>
Some of the tests in DTEST take advantage of the fact that
ByteOrderedPartitioner guarantees certain ordering of partition keys.
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
From Pekka:
"This series enables DROP TABLE statement in the front-end. Our
back-end is not really prepared to deal with it so throw "not
implemented" exception from migration manager."