Commit Graph

4402 Commits

Author SHA1 Message Date
Tomasz Grabiec
72a6f80ce5 bytes_ostream: Introduce write_place_holder() for arbitrary size 2015-07-04 13:46:31 +02:00
Tomasz Grabiec
01c698def4 mutation_reader: Make consume() work with deferring callbacks too 2015-07-03 12:38:36 +02:00
Tomasz Grabiec
59a95f8237 Merge branch 'pdziepak/ttl/v4' from seastar-dev.git
Proper TTL handling from Pawel:

"These patches add support for expiring cells (i.e. the ones with TTL set).
is_live() and is_dead() member functions of atomic cell now take current
timestamp as argument and return appropriate value depending on whether
the cell has expired or not. In order to avoid partially expired rows
timestamp of a request is appropriately propagated"
2015-07-02 19:06:29 +03:00
Paweł Dziepak
36e1fdcff4 tests/cql_query: test expiring cells
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:26 +02:00
Paweł Dziepak
b211bfa514 gc_clock: support adding an offset to the current time
This, intended for tests, feature allows testing time related event without
need for real time waits.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:22 +02:00
Paweł Dziepak
7dbcdb4a9e atomic_cell_base: remove unused function is_dead()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:18 +02:00
Paweł Dziepak
16963b214b sstables: do not write expired cells
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:14 +02:00
Paweł Dziepak
dc23574580 tests/sstable: use 0 as current timestamp
For simplicity in expiration time computations 0 is used as current
timestamp, make sure that sstable write code is aware of that and
doesn't consider cells as already expired.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:10 +02:00
Paweł Dziepak
8fa0049cae sstables: keep current timestamp
Current timestamp will be used to filter out expired cells.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:06 +02:00
Paweł Dziepak
183b6fc6d9 db: do not return already expired cells in queries
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:25:41 +02:00
Paweł Dziepak
61aae4a278 atomic_cell: add checks for expired cells
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:01:19 +02:00
Paweł Dziepak
290a7ca1bf query: add timestamp to read_command
Read command needs a timestamp in order to determine which cells have
already expired.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:01:19 +02:00
Paweł Dziepak
9992795a5c atomic_cell: move common logic to atomic_cell_base
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 16:47:18 +02:00
Avi Kivity
b0fd850463 Merge "Code missing for a NetworkTopologyStrategy integration" from Vlad
"This series add a code missing for an integration of a NetworkTopologyStrategy
with a current clustering WRITE path."
2015-07-02 17:31:49 +03:00
Avi Kivity
1eabf5983f Merge seastar upstream 2015-07-02 17:07:04 +03:00
Gleb Natapov
d0003e4f29 rpc: handler smart pointer return value from rpc handler
Currently if rpc handler returns smart pointer rpc will try to serialize
the pointer object as opposite to an object the ptr is pointing to.
This patch fixes it by serializing real object instead of a pointer.
2015-07-02 16:46:23 +03:00
Gleb Natapov
7d33cf62a5 Add is_smart_ptr metafunction to detect know smart pointers objects 2015-07-02 16:46:23 +03:00
Avi Kivity
4ef3eaef4d Merge "Add tests for query interface on mutation level" from Tomasz 2015-07-02 16:35:27 +03:00
Vlad Zolotarov
89a7e84483 service: storage_proxy: implement datacenter_sync_write_response_handler
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
4a78d173f6 service: storage_proxy::send_to_live_endpoints(): properly query a datacenter name
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
acb8b9fcda service: storage_proxy::mutate(): properly query local_dc
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
77c50dc013 db: consistency_level.hh: complete assure_sufficient_live_nodes()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Use static_cast instead of a dynamic_cast.
2015-07-02 16:00:17 +03:00
Avi Kivity
7145ce7ee9 Merge seastar upstream 2015-07-02 15:59:57 +03:00
Vlad Zolotarov
a4a6c0d69e db: consistency_level.hh: implement is_local()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 15:59:40 +03:00
Vlad Zolotarov
ff770a61a5 db: consistency_level.hh: complete block_for() function
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Use static_cast instead of a dynamic_cast.
2015-07-02 15:58:50 +03:00
Vlad Zolotarov
6b609d5b35 db: consistency_level.hh: implement local_quorum_for()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Use static_cast instead of a dynamic_cast.
2015-07-02 15:56:56 +03:00
Tomasz Grabiec
f89ae4078f tests: Add test for querying a mutation 2015-07-02 14:51:28 +02:00
Tomasz Grabiec
464434d3d4 mutation: Add query() method 2015-07-02 14:51:28 +02:00
Tomasz Grabiec
f711e4e978 tests: Mark assert_that() inline instead of static 2015-07-02 14:51:28 +02:00
Tomasz Grabiec
eba6b492a6 tests: Introduce result_set assertions 2015-07-02 14:51:27 +02:00
Avi Kivity
033e46c7b0 sharded: speed up compilation
- unify three invoke_on() variants by using futurize<>
 - move type calculation out of method signature
2015-07-02 15:33:35 +03:00
Gleb Natapov
c81cf80d8a fix mutation forwarding for muti-DC setup
Forwarding lambda is reused, so we cannot move captures out of it
and we cannot pass references to them either since lambda can be
destroyed before send completes.
2015-07-02 15:30:21 +03:00
Tomasz Grabiec
c5d1f9c493 result_set: Expose get_data_value() 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
4c008e059a result_set: Store schema pointer with result_set 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
f388139a7b result_set_builder: Move to source file 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
a1f6dec067 result_set: Introduce from_raw_result() factory method 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
c9e5508e3c result_set_builder: Make build() return unwrapped object
It's better to let the user decide which kind (if any) of smart
pointer to wrap it into.
2015-07-02 13:25:46 +02:00
Tomasz Grabiec
f46b7a815e query: Fix typos in comments 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
3fc951e807 mutation_partition: Use default value for row_limit in query() 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
1b4a72de14 query: Introduce query::max_rows 2015-07-02 13:25:46 +02:00
Vlad Zolotarov
fa60555ddd locator: network_topology_strategy: make get_datacenters() public
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 13:01:00 +03:00
Avi Kivity
00da6d85c3 future: optimize for compile time
.then()'s return type is a complex template, which needs to be mangled into
the function's name.  Move the return type into a defaulted template type
parameter, so that the entire type expression is eliminated, being replaced
by the result type.

Saves about 1% compile time and 3% object size on futures_test.o.
2015-07-02 12:47:07 +03:00
Vlad Zolotarov
888a33f9d2 locator: add a replication strategy type field to abstract_replication_strategy
This is meant to exclude the exceptions throwing when we want to
branch on a specific instance type (Java's instanceof call).

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 12:26:34 +03:00
Nadav Har'El
53aa239865 sstables: remove some dead code
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-02 12:13:22 +03:00
Tomasz Grabiec
a4d2946d20 Merge branch 'gleb/for_urchin' (read clustering) from seastar-dev.git
Read clustering from Gleb.
2015-07-01 13:31:02 +02:00
Gleb Natapov
4b9661c608 initial read clustering code
Works only if all replicas (participating in CL) has the same live
data. Does not detects mismatch in tombstones (no infrastructure yet).
Does not report timeout yet.
2015-07-01 13:36:30 +03:00
Gleb Natapov
730170ff1a serialize data structures needed for read clustering 2015-07-01 13:36:28 +03:00
Gleb Natapov
3d3d3a8627 implment query::result::digest() 2015-07-01 13:35:57 +03:00
Glauber Costa
0b0d0122fb thrift: create directory in the local shard only
The comment says the directory is created on the local shard only, but when
this code was converted, it ended up being moved inside the invoke_on_all lambda,
which means now it is called from all shards. Fix it by reorganizing the code.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-01 13:14:24 +03:00
Avi Kivity
e9c90060c4 Merge "Keyspace replication strategy options fixes" from Paweł
"These two patches fix handling of replication strategy options: maps are now
serialized and deserialized from json correctly and class name is not stored
together with other replication strategy options."
2015-07-01 13:12:19 +03:00