We now have partition_key_view, clustering_key_view, etc.
Database APIs will be extended to also accept views.
This will alows us to avoid allocations in certain scenarios.
Generic read-all-stream from a commit log segmen file.
Provides a byte view for each data entry, doing CRC checks and padding skips.
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
write() takes a reference to deletion_time which means that the
object must survive until the continuation is scheduled.
This patch fix the problem the use of do_with().
The problem was making debug version of urchin tests fail.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
In preparation for multiple memtables, move column_family::partitions into
its own class, and forward relevant calls from column_family.
A testonly_all_memtables() function was added to support sstable_test.
Currently we use the first byte of the token for determining the local
shard. This is suboptimal for two reasons:
1. the first bytes of the token were already used to select the node,
so they are not randomly distributed
2. using a single byte is not sufficient for large core counts, as the
modulo operation will not return evenly distributed results
Fix by using the final two bytes of the token.
This adds a static method to return a range object to smp.
with this patch it is possible to use:
for (auto i : smp::all_cpus())
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Fix replication strategy class lookup to support unqualified names such
as "SimpleStrategy". The AbstractReplicationStrategy.getClass() method
in origin does the same thing.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
A lookup can cause several data sources to be merged, in which case we will
have to return a temporary (containing data from all the data sources).
For simplicity, we start by always returning a temporary.
Ensure that read-side accessors are const. This is important in preparation
for multiple memtables (and later, sstables) since a read-side
mutation_partition may be a temporary object coming from multiple memtables
(and sstables) while a write-side mutation_partition is guaranteed to belong
to a single memtable (and thus, not be temporary).
Since writers will want non-const mutation_partitions to write to, they won't
be able to use the read-side accessors by accident.