Needed to reasonably cleanly implement token restrictions.
* Fixed constness for various virtuals.
* primary_key_restrictions now inherit abstract_restriction,
similuar to Origin (for better or for worse), to avoid
duplicating attributes etc.
* primary_key_restrictions bounds & values renamed (so not to
collide with restriction), and some logic pushed downwards
(building bounds), to avoid abstraction breakage in
statement_restrictions
* primary_key_restrictions merging is now potentially replacing
to make dispatching token/multicolumn restrictions simpler
Persist column family's "is_dense" value to system tables. Please note
that we throw an exception if "is_dense" is null upon read. That needs
to be fixed later by inferring the value from other information like
Origin does.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Enable column family "bloom_filter_fp_chance" from the CQL front-end and
make sure its persisted to system tables.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
invalid_request_exceptions is one of the exceptions that should be
propagated to the client in form of a error code. That's why it should
belong to a hierarchy with cassandra_exception at root, so that all
exceptions like that can be easily caught and passed to the client.
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
There are both marshal_exception (defined in types.hh) and
exceptions::marshal_exception (defined ini exceptions/exceptions.hh).
The latter is never thrown by anything but caught in few places which
obviously is incorrect.
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
Store the column family key validator in system tables. Please note that
we derive the validator from CQL partition keys and never actually read
it from the database. This is different from Origin which uses
CompositeType that is both stored and read from the system tables.
Fixes#7.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Tested-by: Pekka Enberg <penberg@cloudius-systems.com>
This adds a stub implementation to the commit log metrics.
The calls return the currect value type with a stub value.
After this patch the following url will be available:
/commitlog/metrics/completed_tasks
/commitlog/metrics/pending_tasks
/commitlog/metrics/total_commit_log_size
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the commit log swagger definition to to the commit log
definition file.
The API is based on the CommitLogMetrics.
The following commands were added:
get_completed_tasks
get_pending_tasks
get_total_commit_log_size
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Add a pure virtual i_endpoint_snitch::get_name() method that
should return the corresponding Java-name of a snitch
class instance.
Patch is also available on dev:/snitch-get-name-v1
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
After the implementation of the code that uses the scollectd API was
modified, the get_collectd_value gets the collectd ID as a const
reference, to remove unnessary creation of shared_ptr.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
abstract_replication_strategy::get_natural_endpoints()
does some token calculations before calling strategy specific
calculate_natural_endpoints(), but system table may be read before
token metadata (needed for token calculations) is ready. Fix that by
specializing local_strategy's get_natural_endpoints() to skip token
calculation.