[
https://issues.apache.org/jira/browse/CASSANDRA-15406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17185921#comment-17185921
]
Benjamin Lerer commented on CASSANDRA-15406:
--------------------------------------------
{quote}However there is a weird clash when this is computed because Netstats
reports the total bytes to be sent as total over this "sections size" even it
is sent over like compressed, it is compressed by default by
CassandraCompressedStreamWriter and the individual "total bytes" per each item
to be streamed is taken from its totalSize method and there it is computed as
compressed so the numbers dont match.{quote}
In {{CassandraStreamHeader}} if no {{CompressionInfo}} has been provided via
the {{CassandraStreamHeader.Builder}} the {{size}} field will be computed in
the constructor assuming a {{null}} {{CompressionInfo}}. As
{{CassandraOutgoingFile}} creates a {{CassandraStreamHeader}} without providing
a {{CompressionInfo}} the size computed will always be wrong for compressed
streams.
The correct way to fix the code is in my opinion to remove from the constructor
and the builder the {{compressionInfo}} parameter, to remove the
{{calculateCompressionInfo()}} method and to compute the {{compressionInfo}}
field value within the constructor.
The {{transient}} keyword from the {{compressionInfo}} field can also be
removed as the class does not implement {{Serializable}}.
I also noticed that there is an inconsitency between the
{{CassandraOutgoingFile#write}} and the {{CassandraStreamHeader#calculateSize}}
methods.
If the {{shouldStreamEntireSSTable}} is {{true}} but the {{out}} parameter from
the {{write}} method is not an {{AsyncStreamingOutputPlus}} instance the
computed size will be the wrong one. I did not investigate in which case this
scenario can occurs but we should probably check it too.
> Show the progress of data streaming and index build
> ----------------------------------------------------
>
> Key: CASSANDRA-15406
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15406
> Project: Cassandra
> Issue Type: Improvement
> Components: Consistency/Streaming, Legacy/Streaming and Messaging,
> Tool/nodetool
> Reporter: maxwellguo
> Assignee: Stefan Miklosovic
> Priority: Normal
> Fix For: 4.0, 4.x
>
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> I found that we should supply a command to show the progress of streaming
> when we do the operation of bootstrap/move/decommission/removenode. For when
> do data streaming , noboday knows which steps there program are in , so I
> think a command to show the joing/leaving node's is needed .
>
> PR [https://github.com/apache/cassandra/pull/558]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]