Commit Graph

458 Commits

Author SHA1 Message Date
Avi Kivity
eaca3f7cd1 build: forward compiler selection to seastar configuration 2015-08-03 22:37:32 +03:00
Tomasz Grabiec
b88fc51e2a tests: Introduce test for storage_proxy::make_local_reader() 2015-08-03 15:21:40 +02: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
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
a2b54fc757 main: Introduce init.cc to cleanup service startup code
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.
2015-07-28 18:20:45 +08:00
Nadav Har'El
d074dfe322 build: no need any more to try both ninja and ninja-build
We have the "ninja" variable. Use it.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-28 12:30:49 +03:00
Pekka Enberg
7fc1311d4a db/consistency_level: Move implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-28 10:06:18 +03:00
Amnon Heiman
4908222d6a Adding utils.json Swagger definition file
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>
2015-07-26 10:58:45 +03:00
Tomasz Grabiec
45b4471a0e tests: Introduce test for query::partition_range 2015-07-24 16:08:41 +02:00
Pekka Enberg
78840a690f cql3: Move ut_name implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Pekka Enberg
1e5fad25d7 cql3: Move attributes implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Avi Kivity
8870bf1bf8 Merge "Handling of non-full partition range queries" from Tomasz 2015-07-22 15:18:02 +03:00
Avi Kivity
aa4dae29f3 build: unconditionally rebuild libseastar.a
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.
2015-07-22 15:04:32 +03:00
Tomasz Grabiec
440962dbbf tests: Run mutation source tests on memtable 2015-07-22 13:14:33 +02:00
Tomasz Grabiec
0f3588708e tests: Extract range query tests from sstable_mutation_test into mutation_source_test
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.
2015-07-22 13:14:33 +02:00
Pekka Enberg
e361f2a436 utils/runtime: Add uptime helpers
The functionality is similar to RuntimeMBean.getUptime() that's needed
in schema pulling logic.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 13:02:43 +03:00
Pekka Enberg
c6dc61eab4 service: Convert MigrationTask to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-22 11:57:00 +03:00
Avi Kivity
6d2278f345 build: make libseastar.a depend on seastar configuration
Should cause a rebuild if seastar configuration changes, for example due
to --enable-dpdk.
2015-07-21 19:22:48 +03:00
Avi Kivity
cbc44d19cb build: fix build with dpdk
Rip out the seastar-related dpdk configuration, replace with simply
forwarding dpdk configuration to seastar.
2015-07-21 17:19:01 +03: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
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
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
5339783d56 build: handle case where ninja command is named 'ninja-build' 2015-07-19 21:41:42 +03:00
Avi Kivity
6ccf8f8d86 build: make sure to ask seastar to build http/request_parser.hh, and depend on it 2015-07-19 21:37:14 +03:00
Avi Kivity
cc17c44640 Move seastar to a submodule
Instead of urchin being layered on top of seastar, move seastar to a
subdirectory (as a submodule) and use seastar.pc/libseastar.a to link
with it.
2015-07-19 20:48:36 +03:00
Asias He
1828019d60 streaming: Convert StreamManager.java to C++ 2015-07-14 20:41:14 +08:00
Asias He
85d9204d0e streaming: Drop connection_handler
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.
2015-07-14 20:41:14 +08:00
Asias He
14ae9e66ae streaming: Use shared_ptr to track back to stream_session
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.
2015-07-14 20:41:14 +08:00
Avi Kivity
1072a960e7 build: avoid false positive warning on gcc 5
Maybe-uninitialized, but maybe it is?  No thanks.
2015-07-12 20:55:49 +03:00
Avi Kivity
7684f2f541 Merge "Add ByteOrderedPartitioner" from Paweł
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.
2015-07-12 16:20:19 +03:00
Tomasz Grabiec
6f5c00c515 tests: Add test for mutation queries 2015-07-12 12:54:38 +02:00
Tomasz Grabiec
9bea6aa0a3 db: Introduce mutation query interface
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.
2015-07-12 12:51:38 +02:00
Avi Kivity
9c6dd8b724 Merge "Fix CQL index name case sensitivity" from Pekka
"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>
2015-07-12 12:45:26 +03:00
Pekka Enberg
7e31dfa31f cql3: Convert CFName to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-10 10:49:30 +03:00
Pekka Enberg
573c39386d cql3: Convert IndexName to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-10 10:42:10 +03:00
Pekka Enberg
2c02c9c436 cql3: Convert KeyspaceElementName to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-10 10:31:56 +03:00
Paweł Dziepak
ede9886f50 dht: add byte_ordered_partitioner
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>
2015-07-09 23:43:16 +02:00
Tomasz Grabiec
ec65d7fa73 Introduce partition_slice_builder 2015-07-09 19:55:01 +02:00
Tomasz Grabiec
8a18d2b699 Extract memtable implementation to memtable.cc 2015-07-09 19:46:29 +02:00
Tomasz Grabiec
31b0c60640 Merge branch 'penberg/cql-drop-table' from seastar-dev.git
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."
2015-07-09 10:53:48 +02:00
Asias He
f1dc4f21d5 streaming: Send stream_init_message to remote 2015-07-09 15:52:28 +08:00
Asias He
1aab3c7bb9 streaming: Drop serialization interface for {outgoing,incoming}_file_message
We will send mutations using the frozen_mutation verb
2015-07-09 15:52:28 +08:00
Pekka Enberg
b68f93191e cql3: Convert DropTableStatement to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-09 09:36:39 +03:00
Pekka Enberg
816254ed45 cql3: Convert DropKeyspaceStatement to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-08 18:40:30 +02:00
Calle Wilund
6cf2230cb6 Add batchlog_manager_test
Very simple, and limited, but at least checks that very basic
replay works.
2015-07-08 10:59:57 +02:00