Currently column_family::for_all_partitions() relies on monotonicity
of keys. Adding strict monotonicity requirement doesn't hurt
implementaitons, but makes some consumers simpler.
Current model was not really correct because Origin doesn't support
querying of partition ranges by their value. We can query slices
according to dht::decorated_key ordering, which orders partitions
first by token then by key value.
ring_position encapsulates range constraint. Key value is optional, in
which case only token is constrained.
In theory, when we create a new column family, we should also make sure
that the underlying directory exist. However, this would be quite challenging:
there are a lot of entry points for, add_column_family, none of them are futurized,
and futurizing them could prove challenging up the call chain.
Because we can guarantee that the keyspace directory will exist - now that we
have unified that, it is actually a lot simpler to just make sure that the
directory exist when writing the sstable.
If the keyspace directory wouldn't exist we would have to recurse through the
path. As previously said, this patch will assume this away.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Currently, Origin generates sstables in the form CF-UUID, where UUID
is a string of numbers.
We also do CF-UUID, but for us, UUID has dashes separating the UUID components.
Due to the current test, we fails to load our current sstables. That test
really isn't that important, since we are currently not doing anything with the
UUID. And if we were, we should be able to accept both formats anyway.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Because system keyspace is not created using the same way as the others - and
it would be hard to convert, due to the fact that it is created inside the
database constructor, make sure that it is created when the database boots.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
We are currently generating an empty config, which is wrong and won't
propagate important characteristics of the keyspace.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
A lot of our tests run in memory only, but now that our write path is complete,
we may start running into problems soon, as we write down the sstables.
It would be nice to force the database to run in-memory only in some situations.
Even in the real world, some scenarios may benefit from that in the future.
This patch forces durable_writes to be always false in case we force the data
directory to be an empty list.
For system tables, the patch also fixes a bug. Because system tables were
forceably initialized with durable_writes = false, we would never write them to
disk, even when we were supposed to.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Otherwise tester may crash if _instances destructor is called when thread
responsible for the allocation (which tester spawned to run seastar in)
no longer running.
There are many situations in which we would like to make sure a directory
exists. We can do that by creating the directory we want, and just ignoring
the relevant error.
It is a lot of code though, and I believe it is an idiom common enough to exist
on its own.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
wait() with timeout takes reference to an entry, but when
circular_buffer is resized it may be moved, so freed instance will be
accessed on timeout. Fix it by using std::list instead.
This adds a stub implementation for the storage_proxy.
To simplify future implementation, it takes the passed parameter and
return the correct types with fixed values.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the swagger definition file for the storage_proxy, it is based
on the StorageProxyMBean definition.
The following command where define:
get_total_hints
get_hinted_handoff_enabled
set_hinted_handoff_enabled
get_hinted_handoff_enabled_by_dc
set_hinted_handoff_enabled_by_dc_list
get_max_hint_window
set_max_hint_window
get_max_hints_in_progress
set_max_hints_in_progress
get_rpc_timeout
set_rpc_timeout
get_read_rpc_timeout
set_read_rpc_timeout
get_write_rpc_timeout
set_write_rpc_timeout
get_counter_write_rpc_timeout
set_counter_write_rpc_timeout
get_cas_contention_timeout
set_cas_contention_timeout
get_range_rpc_timeout
set_range_rpc_timeout
get_truncate_rpc_timeout
set_truncate_rpc_timeout
reload_trigger_classes
get_read_repair_attempted
get_read_repair_repaired_blocking
get_read_repair_repaired_background
get_schema_versions
Matricses are not added yet, the basic integration and naming
get_cas_read_timeouts was added under the URL:
/storage_proxy/metrics/
That will holds the related matricses.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>