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"
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>
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>
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.
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.
.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.
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>
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.
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>
"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."