Take the request processing part into the separate function and
run it in parallel for incoming requests.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
"This patchset translates all the remaining parts of Java code needed to
support multi column restrictions. There are at least two problems left
though:
- CASSANDRA-8613 - allow something like:
SELECT * FROM table WHERE c1 = 0 AND (c2, c3) = (1, 2)
currently columns restricted by multi column restrictions need to be a
prefix of clustering key
- CASSANDRA-7281 - incorrect results if some of the columns have reversed
type
I didn't want to delay this patchset any further and fixing these issues
isn't as straighforward as just translating Java to C++."
If a user tries to configure a non-existant logger, he gets an obscure error
message:
$ scylla --logger-log-level nonexistant=info
Exiting on unhandled exception of type 'std::out_of_range': _Map_base::at
With this patch,
$ scylla --logger-log-level nonexistant=info
Exiting on unhandled exception of type 'std::runtime_error':
Unknown logger 'nonexistant'. Use --help-loggers to list available loggers.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
If someone uses "--logger-log-level" with an unknown log level, e.g.,
"--logger-log-level repair=hello", the exception currently reported to the
user is:
bad lexical cast: source type value could not be interpreted as target
In a long command line, the user has no idea where this exception is coming
from. This patches catches this exception, and instead reports a runtime_error
with the text:
Unknown log level 'hello'
Which hopefully should be much more user friendly.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Current code passes the storage_proxy instance of the shard on which the
message was received instead of using the storage_proxy instance of the
shard that sent the request.
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
In preparation for adding listener state to migration manager, use
sharded<> for migration manager.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This message is printed when we are about to run the strategy code
which may not decide to compact anything. Compaction is already
properly logged in sstables::compact_sstables().
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
The sstables write path has been partially de-futurized, but now creates a
ton of threads, and yet does not exploit this as everything is serialized.
Remove those extra threads and futures and use a single thread to write
everything. If needed, we'll employ write-behind in output_stream to
increase parallelism.
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Switch sharding to work on the most significant bits of the token,
rather than the least significant bits. This is more friendly to
range operations, since adjacent partitions will reside on the same shard.
Not exploited yet, except for ignoring sstables that don't belong to a
shard.
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>