13 Commits

Author SHA1 Message Date
Piotr Dulikowski
6465dd160b storage_proxy: fix wrong return type in swagger
The GET `hinted_handoff_enabled_by_dc` endpoint had an incorrect return
type specified. Although it does not have an implementation, yet, it was
supposed to return a list of strings with DC names for which generating
hints is enabled - not a list of string pairs. Such return type is
expected by the JMX.
2020-11-17 10:24:43 +01:00
Konstantin Osipov
94ee511f6a lwt: implement cas_failed_read_round_optimization metric
Presently lightweight transactions piggy back the old
row value on prepare round response. If one of the participants
did not provide the old value or the values from peers don't match,
we perform a full read round which will repair the Paxos table and the
base table, if necessary, at all participants.

Capture the fact that read optimization has failed in a metric.
Message-Id: <20200304192955.84208-2-kostja@scylladb.com>
2020-03-05 12:20:45 +01:00
Amnon Heiman
f43285f39a api: replace swagger definition to use long instead of int (#5380)
In swagger 1.2 int is defined as int32.

We originally used int following the jmx definition, in practice
internally we use uint and int64 in many places.

While the API format the type correctly, an external system that uses
swagger-based code generator can face a type issue problem.

This patch replace all use of int in a return type with long that is defined as int64.

Changing the return type, have no impact on the system, but it does help
external systems that use code generator from swagger.

Fixes #5347

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2019-12-11 12:48:29 +02:00
Vladimir Davydov
e8bcb34ed4 api: drop /storage_proxy/metrics/cas_read/condition_not_met
There's no such metric in Cassandra (although Cassadra's docs mistakenly
say it exists). Having it would make no sense anyway so let's drop it.

Message-Id: <b4f7a6ad278235c443cb8ea740bfa6399f8e4ee1.1570434332.git.vdavydov@scylladb.com>
2019-10-07 16:54:39 +03:00
Amnon Heiman
f3b6c5fe2f API: storage_proxy add CAS and View endpoints
Some nodetool command in 3.0 uses the CAS and View metrics.

CAS is not implemented and we don't have all the metrics for View
but we still don't want those nodetool commands to fail.

After this patch the following would work and will return empty:

curl -X GET --header 'Accept: application/json' 'http://localhost:10000/storage_proxy/metrics/cas_read/moving_average_histogram'

curl -X GET --header 'Accept: application/json' 'http://localhost:10000/storage_proxy/metrics/view_write/moving_average_histogram'

curl -X GET --header 'Accept: application/json' 'http://localhost:10000/storage_proxy/metrics/cas_write/moving_average_histogram'

This patch is needed for #4416

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <20190521141235.20856-1-amnon@scylladb.com>
2019-05-22 14:25:17 +03:00
Amnon Heiman
c8082ccadb API: fix a type in storage_proxy
This patch fixes a typo in the URL definition, causing the metric in the
jmx not to find it.

Fixes #1821

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1478563869-20504-1-git-send-email-amnon@scylladb.com>
2016-11-08 11:09:21 +02:00
Amnon Heiman
b33ed48527 API Definition: change cache_service, column_family and storage_proxy to use rate objects
This patch replaces the latency histogram to
rate_moving_avrage_and_histogram and the counters to
rate_moving_average.

The old endpoints where left unchagned but marked as depricated when
needed.
2016-05-17 11:55:06 +03:00
Amnon Heiman
e1168c0a34 API: Add estimated histogram to storage_proxy
This patch close the gap between the storage_proxy read, write and range
metrics and the API.

For each of the metrics there will be a histogram, estimated histogram
and total.

The patch contains the definitions for the following:
get_read_estimated_histogram
get_read_latency
get_write_estimated_histogram
get_write_latency
get_range_estimated_histogram
get_range_latency

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>

need mrege storage_proxy
2015-10-22 18:54:45 +03:00
Amnon Heiman
a071cdce66 API: Add getters to storage_proxy timers timeout
This patch expose the configuration timeout values of the timers.
The timers will return their values in seconds, the swagger definition
file was modified to reflect the change.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-10-22 18:54:11 +03:00
Amnon Heiman
2b59bb2d2b API: storage proxy definition cas read and write
This patch add some missing definition for cas read an write, the API
definition is for completness only as we do not support cas yet.

It also change a part of the definition from storage_service to
storage_proxy as it should be.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-10-04 11:52:19 +03:00
Amnon Heiman
429f7d2b20 API: Adding the histogram stats definition to storage_proxy
This adds the read, write and range histograms to the storage_proxy
It adds the following commands:
get_read_metrics_latency_histogram
get_range_metrics_latency_histogram
get_write_metrics_latency_histogram

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-26 11:03:30 +03:00
Amnon Heiman
c82b89a8b0 Adding the metrics definition to the storage_proxy
This adds the storage definition to the storage proxy swagger definition
file.
It adds the definitions for the following command:
get_cas_write_metrics_unfinished_commit
get_cas_write_metrics_contention
get_cas_write_metrics_condition_not_met
get_cas_read_metrics_unfinished_commit
get_cas_read_metrics_contention
get_cas_read_metrics_condition_not_met
get_read_metrics_timeouts
get_read_metrics_unavailables
get_range_metrics_timeouts
get_range_metrics_unavailables
get_write_metrics_timeouts
get_write_metrics_unavailables

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-12 14:05:05 +03:00
Amnon Heiman
c41ccb4ce4 API Adding the storage_proxy definition file
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>
2015-06-18 11:30:30 +03:00