[
https://issues.apache.org/jira/browse/CASSANDRASC-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781916#comment-17781916
]
ASF subversion and git services commented on CASSANDRASC-81:
------------------------------------------------------------
Commit d8e9e2359db1f5561eb872d28ab16098b5a62c1d in cassandra-sidecar's branch
refs/heads/trunk from Francisco Guerrero
[ https://gitbox.apache.org/repos/asf?p=cassandra-sidecar.git;h=d8e9e23 ]
CASSANDRASC-81: Improve TokenRangeReplicasResponse payload
The `TokenRangeReplicasResponse` returns a list with `ReplicaMetadata`. This
information is used by clients to lookup
replica metadata. The lookup is done with the replica information, which
consists of the `ip:port`.
Clients are looping over the `ReplicaMetadata` list and matching IP and port to
retrieve the metadata object. Instead,
we can improve the payload by changing the data structure from a list to a map,
and have clients lookup by the replica
(ip + port), without having to loop.
Patch by Francisco Guerrero; Reviewed by Arjun Ashok, Dinesh Joshi, Yifan Cai
for CASSANDRASC-81
> Improve TokenRangeReplicasResponse payload
> ------------------------------------------
>
> Key: CASSANDRASC-81
> URL: https://issues.apache.org/jira/browse/CASSANDRASC-81
> Project: Sidecar for Apache Cassandra
> Issue Type: Improvement
> Components: Rest API
> Reporter: Francisco Guerrero
> Assignee: Francisco Guerrero
> Priority: Normal
> Labels: pull-request-available
>
> The {{TokenRangeReplicasResponse}} returns {{ReplicaMetadata}}. This
> information is used by clients to lookup the metadata. The lookup is done
> with the replica information, which consists of the host {{ip:port}}. Clients
> are looping over the {{ReplicaMetadata}} list and matching IP and port to
> retrieve the metadata object. Instead, we can improve the payload by changing
> the data structure from a list to a map, and have clients lookup by the
> replica (ip + port), without having to loop.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]