bbotella commented on code in PR #3750:
URL: https://github.com/apache/cassandra/pull/3750#discussion_r1890704885
##########
src/java/org/apache/cassandra/tools/nodetool/ListSnapshots.java:
##########
@@ -81,18 +82,20 @@ public void execute(NodeProbe probe)
{
final List<?> value = (List<?>) eachValue;
if (includeEphemeral)
- table.add(value.toArray(new String[value.size()]));
- else
table.add(value.subList(0, value.size() -
1).toArray(new String[value.size() - 1]));
+ else
+ table.add(value.subList(0, value.size() -
2).toArray(new String[value.size() - 2]));
+
+ totalTrueDiskSize += (Long) value.get(value.size() - 1);
}
}
table.printTo(out);
- out.println("\nTotal TrueDiskSpaceUsed: " +
FileUtils.stringifyFileSize(trueSnapshotsSize) + '\n');
+ out.println("\nTotal TrueDiskSpaceUsed: " +
FileUtils.stringifyFileSize(totalTrueDiskSize) + '\n');
Review Comment:
If we are not changing the meaning of the metric, then please disregard my
comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]