Make sharding partitioner-specific, since different partitioners interpret
the byte content differently.
Implement it by extracting the shard from the most significant bits, which
can be used to minimize cross shard traffic for range queries, and reduces
sstable sharing.
"This series improves parallel CQL table creation to validate CF UUID.
This should bring us closer to Origin behavior when there's multiple
cassandra-stress processes started at the same time."
Add CF UUID validation to update table paths to make us behave like
Origin for parallel table creation.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
The existing code tried to make the logger a function-local static object.
This attempt is commendable, because it means the logger is only created
when first used - if used at all. But it doesn't play well with our logging
infrastructure, which *assumes* that all logger objects are created during
initialization, and register themselves, to make it possible to implement
the "--logger-log-level" and "--help-loggers" command line parameters.
So the logger needs to be a global object, not a function-local object.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
This adds the API implementation for the read, write, number of
panding flushes and memtable switch count.
The implementation uses a helper function to perform map and map_reduce
on column_family.
The get_uuid helper method now supports both colon notations (i.e.
either as a ":" or as %3A)
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the read and write counters to the column_family swagger
definitions.
It adds the following commands:
get_read
get_all_read
get_write
get_all_write
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Only unexpected server errors should be logged, exception classes
deriving from cassandra_exception do not count as those.
Fixes#60.
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
This adds the stats object to column_family.
It set the write counter in the write path and support the pending_flush
counter.
The stats object contains information for switch_count, number of
pending flushes, and counters for read, write, and range.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
We sleep storage_service_ring_delay until we abort due to failing to
talk to a seed node. We should retry sending GossipDigestSyn message,
instead of sending it once.
With this, we can start the seed node and normal node in a script like
below, without any sleep between.
./scylla --listen-address 127.0.0.1
./scylla --listen-address 127.0.0.2
This is useful for testing.
When process() terminated _ready_to_respond contains the future with the
state of the last I/O operation of this connection. Consume it at the
end of process().
Fixes issue #44
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Several of Scylla's options (in db/config.hh) have the type "string_map"
(unordered_map<sstring, sstring>). The intent was such options could get
multiple "key=value" settings. However, this never actually worked correctly,
and had two bugs:
1. Any option name with a space in it would fail, for example:
$ scylla --logger-log-level 'BatchLog Manager=info'
error: the argument ('BatchLog Manager=info') for option '--level'
is invalid
2. Trying to set multiple entries in the map did *not* work. For example,
$ scylla --logger-log-level a=info --logger-log-level b=info
error: option '--level' cannot be specified more than once
The problem is that boost::program_options does not actually understand
unordered_map<sstring, sstring>: It doesn't know it is a container (it
only recognizes std::vector) so it doesn't allow multiple options, and
it doesn't know how to convert a string to it, so it uses boost::lexical_cast
which for strings, cuts the string at a space...
The solution is to write a custom "validate()" function overload, which
boost::program_options uses to validate (and consume) options into object
types it doesn't understand by default. Getting this function in the right
place in the code was a difficult exercise, but here it is, a working
implementation :-) And it fixes the above two bugs.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Abillity to enable/disable specific sub-modules - this settings do not
affect system tables which are allways persisted,cached and written to
commitlog
enable-in-memory-data-store marks if tables will be written/read to/from
disk
enable-commitllog marks if tables will be written to commitlog
enable-cache marks if tables will be written/read to/from cache
Please note in-memory-data-store does not change the read path so "old"
sstables are still read and cache may be used to cache their data
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
Calling the logger 'main' may cause confusion to external readers not familiar
with the source code, since there is nothing 'main' about this logger in
particular - that is just the file name.
It is then called the start up log.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
* seastar beeaccb...3cf6bee (4):
> dpdk: i40e_should_linearize(): Check the resulting cluster and not the original packet
> reactor: fix inverted logic in recursive_touch_directory()
> build: suport -march=... in cflags
> tests: futures_test: Add test case for parallel_for_each()
The same way we create a directory for the sstables, we should do it for the
commitlog.
If you, like me, have been using the --datadir directive, the fact that we
don't do it would have slipped away: when using --datadir, both the commitlog
and sstables will be put in this same root.
However, when using the system defaults from the configuration file, this won't
be true.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
There is a small but potentially serious mistake in the way we are computing
the number of regular columns. We are using an incorrect offset, and the
number of regular columns in a table like this:
schema(...,
{{"pk", utf8_type}},
{{"ck", utf8_type}, {"ck2", utf8_type}},
{
{"reg1", long_type},
{"reg2", long_type},
},
{{"static", utf8_type}},
utf8_type,
"comment"
);
is being reported as 3.
Fix this
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
We should only call column_family::start after the checks because
if a check failed, column_family would be destroyed without
column_family::stop being called first, and that would lead to
a problem, such as _compaction_done future not being resolved.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>