Commit Graph

53948 Commits

Author SHA1 Message Date
Takuya ASADA
c341579568 dist: add make on build dependency
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-08-26 12:47:36 +03:00
Glauber Costa
391eea564e system_tables: implement load_host_id
A simple translation from the original code.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-25 19:16:30 -05:00
Glauber Costa
0fd2861293 system_tables: implement load_tokens
A simple translation from the original code

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-25 19:16:30 -05:00
Glauber Costa
cd5d93fe3a sstables: change default buffer size to 128k
Example run of perf_sstable_index:

 64k: 1401296.23 +- 5461.20 partitions / sec (30 runs, 1 concurrent ops)
128k: 1459283.89 +- 6674.87 partitions / sec (30 runs, 1 concurrent ops)

This is 4 % higher on an 0.45 % error

For larger buffers, like 256k, this doesn't yield a consistent gain, sometimes
yielding a loss.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-25 18:31:50 -05:00
Glauber Costa
873cf17cf4 sstable tests: allow for the creation of sstables of non-default buffer size.
This can now be used in the sstable_index_write performance test.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-25 18:31:50 -05:00
Glauber Costa
a5e173ec98 sstable: move buffer size inside the sstable object.
We'll pay the price of having this now as a variable instead of a constexpr,
but this dims in comparison with the rest of the operation.

By paying this cost, we gain the ability of actually specifying it during test
runs, making it easy to automate scripts that will measure the performance over
various buffer sizes.

I am also providing a new constructor that allows for the setting of the buffer
size.  The said constructor will be private, meaning that only the test class
will be able to use it.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-25 18:31:50 -05:00
Glauber Costa
f4d8310d88 perf_sstable_index: calculate time spent before the map reduce operation.
Not doing that will include the smp communication costs in the total cost of
the operation. This will not very significant when comparing one run against
the other when the results clearly differ, but the proposed way yields error
figures that are much lower. So results are generally better.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-25 18:31:49 -05:00
Glauber Costa
19d25130af perf_sstable_index: make parallelism an explicit option
As we have discussed recently, the sstable writer can't even handle intra-core
parallelism - it has only one writer thread per core, and for reads, it affects
the final throughput a lot.

We don't want to get rid of it, because in real scenarios intra-core
parallelism will be there, specially for reads. So let's make it a tunable so we
can easily test its effect on the final result.

The iterations are now all sequential, and we will run x parallel invocation at
each of them.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-08-25 18:31:49 -05:00
Asias He
65af005ad0 storage_service: Kill get_saved_caches_location
It is implemented in api/storage_service.cc ss::get_saved_caches_location.
2015-08-26 06:51:48 +08:00
Asias He
dd8fb73370 storage_service: Kill getCommitLogLocation
It is implemented in api/storage_service.cc ss::get_commitlog.
2015-08-26 06:51:47 +08:00
Asias He
192d54d163 storage_service: Kill get_all_data_file_locations
It is implemented in api/storage_service.cc.
2015-08-26 06:51:47 +08:00
Asias He
d218e56a3f storage_service: Kill get_current_generation_number
It is implemented in api/storage_service.cc.
2015-08-26 06:51:47 +08:00
Asias He
7f741f90eb api/storage_service: Add join_ring
$ curl -X POST --header "Content-Type: application/json" --header "Accept:
application/json" "http://127.0.0.1:10000/storage_service/join_ring"
2015-08-26 06:51:47 +08:00
Asias He
9528f27201 api/storage_service: Add is_joined
$ curl -X GET --header "Accept: application/json"
"http://127.0.0.1:10000/storage_service/join_ring"

true
2015-08-26 06:51:47 +08:00
Asias He
a145787afc api/storage_service: Add stop_gossiping
$ curl -X DELETE --header "Accept: application/json"
"http://127.0.0.1:10000/storage_service/gossiping"
2015-08-26 06:51:47 +08:00
Asias He
5d758a89d7 storage_service: Implement stop_gossiping 2015-08-26 06:51:47 +08:00
Asias He
67768c5e1b api/storage_service: Add start_gossiping
$ curl -X POST --header "Content-Type: application/json" --header "Accept:
application/json" "http://127.0.0.1:10000/storage_service/gossiping"

btw, the description looks incorrect:
   POST /storage_service/gossiping
   allows a user to recover a forcibly 'killed' node
2015-08-26 06:51:47 +08:00
Asias He
87735b1069 storage_service: Implement start_gossiping 2015-08-26 06:51:47 +08:00
Asias He
c475f992a9 storage_service: Add get_generation_number helper 2015-08-26 06:51:47 +08:00
Asias He
6b4f27dc84 api/storage_service: Add is_gossip_running
$ curl -X GET --header "Accept: application/json"
"http://127.0.0.1:10000/storage_service/gossiping"

true
2015-08-26 06:51:47 +08:00
Asias He
36d86865a8 storage_service: Implement is_gossip_running 2015-08-26 06:51:47 +08:00
Asias He
5d5016f8d1 api/storage_service: Add is_starting
$ curl -X GET --header "Accept: application/json"
"http://127.0.0.1:10000/storage_service/is_starting"

false
2015-08-26 06:51:47 +08:00
Asias He
5dbbdd81e5 storage_service: Implement is_starting 2015-08-26 06:51:47 +08:00
Asias He
28a3eef9e3 api/storage_service: Add get_operation_mode
$ curl -X GET --header "Accept: application/json"
"http://127.0.0.1:10000/storage_service/operation_mode"

"NORMAL"
2015-08-26 06:51:47 +08:00
Asias He
e13956354e storage_service: Implement get_operation_mode 2015-08-26 06:51:47 +08:00
Asias He
cafdb99d23 api/storage_service: Add get_schema_version
$ curl -X GET --header "Accept: application/json"
"http://127.0.0.1:10000/storage_service/schema_version"

"59adb24e-f3cd-3e02-97f0-5b395827453f"
2015-08-26 06:51:47 +08:00
Asias He
33db0995b9 api/storage_service: Add get_release_version
$ curl -X GET --header "Accept: application/json"
"http://127.0.0.1:10000/storage_service/release_version"

"2.1.8"
2015-08-26 06:51:47 +08:00
Asias He
620a5ae5b6 storage_service: Implement get_schema_version 2015-08-26 06:51:47 +08:00
Asias He
9172578f78 storage_service: Implement get_release_version 2015-08-26 06:51:47 +08:00
Avi Kivity
e6965c520d Merge "Adding the ownership suport to storage_service" from Amnon
"This series adds the missing code from origin to support this functionality.
While doing so, some method where changed to be const when it was more
appropriate and a few const version of methods where added when the two
variation was required."
2015-08-25 20:13:33 +03:00
Avi Kivity
6e3cf26c73 Merge "improve mutation related errors logging" from Vlad
Fixes #30.
2015-08-25 19:44:25 +03:00
Amnon Heiman
c92bd9b121 API: Adding the ownership implmentation to storage_service
This adds the ownwership method implementation to the storage_service
API. After the patch the following url will be supported:

GET /storage_service/ownership/{keyspace}
GET /storage_service/ownership/

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:14 +03:00
Amnon Heiman
2c5716dac3 API: storage_service Add the swagger definition for ownership
This adds the API for get_effective_ownership and
get_ownership in storage_service.

It is based on the StorageServiceMBean definition.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:13 +03:00
Amnon Heiman
fd20f167e7 storage_service: get_ranges_for_endpoint, get_ownership and
effective_ownership

This patch adds the implementation for get_ranges_for_endpoint,
get_ownership and effective_ownership based on origin implementation.

The methods are used by the API.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:13 +03:00
Amnon Heiman
b5ceef451e keyspace: Add the get_non_system_keyspaces and expose the replication
This patch adds the get_non_system_keyspaces that found in origin and
expose the replication strategy. With the get_replication_strategy
method.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:13 +03:00
Amnon Heiman
6d875f1ec1 token_metadata: Add const when applicable
This patch adds a const version for get_datacenter_endpoints and
get_topology.

It modified the token iterator to use a const version of token_metadata
and it make first_token, first_token_index, tokens_end and ring_range to
be a const method.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:13 +03:00
Amnon Heiman
3d27fa442b strategy: make some of the function const
This patch adds const for some of the methods that are not actually
changing the object content.

This is useful when using a const reference to the object.

calculate_natural_endpoints and has_sufficient_replicas where set as
const. The override was added where it was missing.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:13 +03:00
Amnon Heiman
5e03524d9d murmur3_partitioner: add describe_ownership from origin
The code was taken from origin, where instead of BigInteger, uint64_t was used.

The function returns the part that each token is responsible for, the sum of
all is raughly 1.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:08 +03:00
Vlad Zolotarov
08e7736f0b database::find_column_family(): init the exception with the readable message
Make the exceptions created inside database::find_column_family() return
a readable message from their what() method.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-08-25 18:00:19 +03:00
Vlad Zolotarov
eafa491009 storage_proxy: log all exceptions thrown in the mutation verb handler flow
Catch and log the exceptions thrown in the mutation receiver flow for better
debugability.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Don't dowithicate the ready future - call make_ready_future<>().then(...)
     directly.
   - Fix and unify the messages printed when the exception is caught.
2015-08-25 18:00:16 +03:00
Tomasz Grabiec
2bfb138910 Fix typos 2015-08-25 17:07:35 +03:00
Tomasz Grabiec
f2713561f5 row_cache: Avoid copy when moving whole entry from memtable to cache 2015-08-25 17:07:34 +03:00
Tomasz Grabiec
cb72d02c98 row_cache: Rename underlying_negative to presence_checker 2015-08-25 17:07:33 +03:00
Avi Kivity
b22a598efb mutation_reader: make noncopyable
Many mutation_reader implementations capture 'this', which, if copied,
becomes invalid.  Protect against this error my making mutation_reader
a non-copyable object.

Fix inadvertant copied around the code base.
2015-08-25 15:49:08 +03:00
Avi Kivity
5cd8a66291 compaction: avoid use-after-free
Compaction moves output_writer and done out of variables which are then
reused, causing use-after-free.  In addition it fails to protect the variables
for the end of the loop.

Fix by avoiding the moves and adding an additional capture.
2015-08-25 15:49:08 +03:00
Amnon Heiman
f55c168ae7 API: Add column family mean row size
This adds the column family mean row size in the per column family and
the total version. I uses the ratio_helper class to calculate the mean
over all the shrades.
2015-08-25 15:48:25 +03:00
Amnon Heiman
7dc098ed3d estimated histogram mean method should be const
The mean method does not change the object and should be const.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 15:48:24 +03:00
Amnon Heiman
db30a588b2 API: Break the async repair into two operations
This distinguish between the async repair that starts the repair, that
will now be a POST request and the method that check on the command
progress that will now be a GET command.

After the change each operation would get the parameters that it needs.

The GET will return an enum based on the repair_status.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 15:45:30 +03:00
Tomasz Grabiec
4c030bb597 api: Fix return type for /lsa/compact 2015-08-25 15:29:10 +03:00
Gleb Natapov
8599e9d84f protect messaging_service destruction by a gate object
Pointer to messageing_service object is stored in each request
continuation, so the object destruction should not happen while any of
these continuations is scheduled. Use gate object to ensure that.
2015-08-25 15:28:58 +03:00