[ 
https://issues.apache.org/jira/browse/CASSANDRA-20149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANDRA-20149:
------------------------------------------
    Status: Needs Committer  (was: Patch Available)

> nodetool listsnapshots initiates two jmx calls unnecessarily
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-20149
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20149
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Local/Snapshots
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 5.x
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> listsnapshots calls jmx on two occasions
> 1) when getting trueSnapshotsSize
> 2) when getting snapshot details
> What it was doing in practice before CASSANDRA-18111 was that it was 
> essentially loading the snapshots twice hence almost double the time to list.
> What it is doing after CASSANDRA-18111 is that it still resolves sizes but in 
> a way more efficient way however it still calls jmx twice which is not 
> necessary.
> The fix consists of returning resolved sizes together with snapshot details 
> and then on the client size we just display and sum it up in case of wanting 
> to know the total. 
> It is more optimal to just return results in one response and sum few numbers 
> on the client from the results than to call jmx twice. 
> This also means that a user will get true size of a snapshot in the result of 
> snapshot details automatically. They do not need to call extra MBean method 
> for that (which this patch opportunistically introduces too).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to