Commit Graph

212 Commits

Author SHA1 Message Date
Avi Kivity
6fee695095 db: replace most uses of protocol_version with serialization_format
Better type safety.
2015-03-16 18:15:16 +02:00
Avi Kivity
c99185677b tests: add test for set literals and set addiitions 2015-03-16 16:45:36 +02:00
Avi Kivity
e28938b8d6 tests: fix cql_query_test indentation 2015-03-16 16:45:36 +02:00
Avi Kivity
e6828d7ad0 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	configure.py
2015-03-15 20:39:30 +02:00
Avi Kivity
d3acb5acc2 linecount: better error handling 2015-03-15 14:48:52 +02:00
Avi Kivity
0537a8ffe5 linecount: don't try to create the file.
It's read-only.
2015-03-15 14:48:31 +02:00
Avi Kivity
df7bb8cc58 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	configure.py
2015-03-12 16:31:17 +02:00
Avi Kivity
d5817ab965 Merge branch 'gleb/rpc' of github.com:cloudius-systems/seastar-dev
Conflicts:
	configure.py
2015-03-12 16:30:15 +02:00
Shlomi Livne
83998a8934 tests: Boostify the fstream_test
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-03-12 15:56:25 +02:00
Gleb Natapov
7adf4f935d rpc test program 2015-03-12 15:38:18 +02:00
Shlomi Livne
83c0196255 tests: make sure each SEASTAR_TEST_CASE has at least a single BOOST_XXX check
SEASTAR_TEST_CASE that did not execute a single BOOST_XXX check was
maakred as "[Message] - Test case .... did not check any assertions" and
is placed in /usr/include/boost/test/impl/results_collector instead of
the correct test file.

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-03-12 15:21:29 +02:00
Tomasz Grabiec
2ee58d66d6 Merge tag 'avi/collections/v3'
Conflicts:
	tests/urchin/cql_query_test.cc

[tgrabiec: fixed compilation error in cql3/maps.hh]
2015-03-12 11:30:17 +01:00
Pekka Enberg
3f019ee9c0 tests: create keyspace statement test case
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-03-12 10:30:25 +02:00
Avi Kivity
d41b4e57ad tests: add test for map literal and setting a map value by key 2015-03-12 10:22:17 +02:00
Avi Kivity
90ef430d1f tests: add list_type mutation test 2015-03-12 09:56:53 +02:00
Avi Kivity
6f3e63fb3a tests: add set mutation test 2015-03-12 09:56:53 +02:00
Avi Kivity
77196afb95 Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-03-11 19:32:52 +02:00
Avi Kivity
3a35fe061b tests: tighten when_all() compare
Fails on one compiler.
2015-03-11 19:31:55 +02:00
Avi Kivity
5b6e23ebde tests: reduce BOOST_REQUIRE() calls
when_all() tests generate two million calls to BOOST_REQUIRE(), which
overwhelms the test result parser.  Replace with two calls and use all_of()
to process the result array.
2015-03-11 19:25:54 +02:00
Avi Kivity
b3dd714e00 Merge branch 'tgrabiec/select' of github.com:cloudius-systems/seastar-dev into db
Cql select support, from Tomasz.
2015-03-11 19:02:08 +02:00
Avi Kivity
d0705e6e82 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	configure.py
2015-03-11 19:01:37 +02:00
Avi Kivity
e659ca2629 Merge branch 'when_all' of github.com:cloudius-systems/seastar-dev
when_all() variant for runtime-sized lists of futures.
2015-03-11 17:06:23 +02:00
Tomasz Grabiec
053f9e6d05 tests: Add tests for parsing and execution of CQL select statement 2015-03-11 16:01:14 +01:00
Tomasz Grabiec
ebb417a03b tests: Add cartesian product test 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
1ba0015a99 Merge remote-tracking branch 'seastar/master'
Conflicts:
	configure.py
2015-03-11 14:45:35 +01:00
Tomasz Grabiec
293a6e7547 tests: Test distributed::map_reduce() version which takes a functor 2015-03-11 13:33:53 +01:00
Tomasz Grabiec
200f4698b5 tests: Add test for map_reduce() 2015-03-11 13:24:31 +01:00
Avi Kivity
713d9561e9 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	configure.py
2015-03-11 10:12:38 +02:00
Raphael S. Carvalho
10a71dadac tests: add fstream testcase 2015-03-10 18:44:40 -03:00
Avi Kivity
a3695dbcc4 future: add a test case for runtime sized when_all() 2015-03-10 22:01:55 +02:00
Avi Kivity
c4febdeb63 Merge branch 'glommer/index-reader-v4' of github.com:cloudius-systems/seastar-dev into urchin
Sstable index reader, from Glauber.
2015-03-10 20:24:02 +02:00
Glauber Costa
7c96752a46 sstable_tests: add tests for index reads
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-10 15:13:14 -03:00
Avi Kivity
0139a210e2 Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-03-10 17:04:16 +02:00
Shlomi Livne
f8d773dd47 tests: fix future unitest that sometimes fails because of scheduling
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-03-10 16:38:43 +02:00
Avi Kivity
9288b360f6 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Includes adaptation by Nadav for the removal of file_input_stream:

sstables.cc used file_input_stream, which we replaced by the new
make_file_input_stream. We also couldn't make sstables.cc read either
a file_input_stream or the planned compressed_file_input_stream.

So in this patch we implement an API similar to the old "file_input_stream"
based on the new make_file_input_stream. file_input_stream now has a parent
class "random_access_reader", preparing for a future patch to support both
file_input_stream and compressed_file_input_stream in the same code - by making
all the parsers take a random_access_reader reference instead of file_input_stream.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-03-10 15:50:04 +02:00
Nadav Har'El
7a04d1f662 fstream: refactor file input stream interface
The file_input_stream interface was messy: it was not fiber safe (e.g., code
doing seek() in the middle of an ongoing read_exactly()), and went against
the PIMPL philosophy.

So this patch removes the file_input_stream class, and replaces it with a
completely different design:

We now have in fstream.hh a global function:

input_stream<char>
make_file_input_stream(
        lw_shared_ptr<file> file, uint64_t offset = 0,
	uint64_t buffer_size = 8192);

In other words, instead of "seeking" in an input stream, we just open a new
input stream object at a particular offset of the given file. Multiple input
streams might be concurrently active on the same file.

Note how make_file_input_stream now returns a regular "input_stream", not a
subtype, and it can be used just like any normal input_stream to read the stream
starting at the given position.

This patch makes "input_stream" a "final" type: we no longer subclass it in our
code, and we shouldn't in the future because it goes against the PIMPL design
(the subclass should be of the inner workings, like the data_source_impl, not
of input_stream).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-03-10 15:39:17 +02:00
Avi Kivity
9639a7207e Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	test.py
2015-03-10 13:06:02 +02:00
Tomasz Grabiec
dad1253ca1 tests: Add test for tuple_type::compare() 2015-03-10 10:16:55 +02:00
Calle Wilund
d5ba374495 Test fix. Retain commitlog until it is cleared, which is a potentially "blocking" op. Should fix jenkins test crashes.
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
2015-03-10 08:48:16 +01:00
Amnon Heiman
810d8c88d8 Adding httpd tests 2015-03-08 21:55:57 +02:00
Amnon Heiman
29391d9a9b Extending sstring
This patch adds some of the common functionalities from std:string to
sstring.

It adds length (implement by size() )
It define the constant npos to indicate no possition.
It adds the at (reference and const reference)
It define the find char and find sstring methods
and the substr method

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>

need merge sstring
2015-03-08 21:55:57 +02:00
Shlomi Livne
a40ef8bfe1 future: Add test case for finally being called on non immediate available future
Found that we are missing tests in code coverage review

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
[avi: fix formatting]
2015-03-08 16:52:26 +02:00
Avi Kivity
9b39bd410e Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-03-08 15:02:24 +02:00
Tomasz Grabiec
7502f2a3a3 tests: Add test for returning bare values from callbacks 2015-03-06 11:35:56 +01:00
Raphael S. Carvalho
41846256d8 tests: fix fileiotest
engine() cannot be called before the local_engine was constructed because it
dereferences the pointer local_engine to create a reference.
Consequently, the following error can be seen while running fileiotest:
./core/reactor.hh:854:13: runtime error: reference binding to null pointer of
type 'struct reactor' ASAN:SIGSEGV

Let's switch the test to use app_template.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-03-06 10:06:16 +02:00
Tomasz Grabiec
3db3207b85 Merge branch seastar-dev.git 'collections'
Collections support from Avi.
2015-03-05 20:25:48 +01:00
Avi Kivity
6126670078 mutation_test: test maps 2015-03-05 20:03:57 +02:00
Calle Wilund
054f9ed082 Initial commit log support.
Implements a cassandra-file-compatible segmented log
of "mutations". Handles "batch" and "periodic" mode like
stock version. Also includes "dirty" management for the
interaction log/memtable.

Supports:
* add
* sync/flush
* clear dirty bits (thus discarding segments)

Many more estoric stock functions not yet implemented.

Missing: Storage management. Does not deal with total
size on disk of segments yet. Nor does it have any provisions
for dealing with active buffer bloat should async writes stall.

[avi: adjust for future<>::rescue() removal]
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
2015-03-05 11:06:09 +02:00
Avi Kivity
5902243dc5 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Global adjustment due to the removal of future<>::rescue().
2015-03-05 11:00:11 +02:00
Tomasz Grabiec
83963b23d3 Replace rescue() usages with then_wrapped()
They are pretty much the same. This change removes rescue().
2015-03-04 17:34:59 +01:00