Skip to content

Conversation

@smaczliwka
Copy link

The PR introduces new replica-side tracing information gathered in opentelemetry state and send by a coordinator to the client in custom payload:

  • number of partitions read in DMA reads,
  • amount of data read this way.

@smaczliwka smaczliwka requested a review from haaawk as a code owner April 22, 2022 14:16

void opentelemetry_state_data::serialize_dma_counter(bytes& serialized) const {
const auto counter = htonl(_dma_counter);
const auto *counter_ptr = reinterpret_cast<const int8_t*>(&counter);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By chance, int8_t* doesn't break strict aliasing?

return _proxy->_messaging.send_read_data(netw::messaging_service::msg_addr{ep, 0}, timeout, *_cmd, _partition_range, opts.digest_algo).then([this, ep](rpc::tuple<query::result, rpc::optional<cache_temperature>> result_hit_rate) {
auto&& [result, hit_rate] = result_hit_rate;
return _proxy->_messaging.send_read_data(netw::messaging_service::msg_addr{ep, 0}, timeout, *_cmd, _partition_range, opts.digest_algo).then([this, ep](rpc::tuple<query::result, rpc::optional<cache_temperature>, tracing::trace_state_ptr::cache_counter_t, tracing::trace_state_ptr::dma_counter_t, tracing::trace_state_ptr::dma_size_t> result_hit_rate) {
auto&& [result, hit_rate, cache_counter, dma_counter, dma_size] = result_hit_rate;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I suggest that we put comments wrt. "parent PRs" here, so they can be all fixed at once)
My suggestion is to modernize the name of result_hit_rate

@smaczliwka smaczliwka force-pushed the opentelemetry-dma-reads branch 2 times, most recently from f6f9e1f to f912bab Compare May 2, 2022 08:47
Deexie and others added 3 commits May 6, 2022 14:19
Add an attribute to opentelemetry_state to store a number of partitions read from the cache.

Extend RPC READ_DATA procedure to pass a number of reads from the cache in replicas.
It's summed up by the coordinator and returned in custom_payload.
@smaczliwka smaczliwka force-pushed the opentelemetry-dma-reads branch from f912bab to 10e6316 Compare May 6, 2022 13:14
@margdoc margdoc force-pushed the opentelemetry-dma-reads branch from 10e6316 to 1ee37d7 Compare May 13, 2022 08:53
margdoc and others added 2 commits May 14, 2022 17:24
Move gathered telemetry data to opentelemetry_state_data and make it sharded.
@margdoc margdoc force-pushed the opentelemetry-dma-reads branch from 1ee37d7 to 4ac7e6a Compare May 14, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants