You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/04/23 11:30:58 UTC

[GitHub] [cassandra] smiklosovic opened a new pull request #558: CASSANDRA-15406 - added progress of streaming in percents in netstats command

smiklosovic opened a new pull request #558:
URL: https://github.com/apache/cassandra/pull/558


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a change in pull request #558: CASSANDRA-15406 - added progress of streaming in percents in netstats command

Posted by GitBox <gi...@apache.org>.
smiklosovic commented on a change in pull request #558:
URL: https://github.com/apache/cassandra/pull/558#discussion_r465324840



##########
File path: src/java/org/apache/cassandra/db/streaming/CassandraCompressedStreamReader.java
##########
@@ -97,7 +97,7 @@ public SSTableMultiWriter read(DataInputPlus inputPlus) throws IOException
                 {
                     writePartition(deserializer, writer);
                     // when compressed, report total bytes of compressed chunks read since remoteFile.size is the sum of chunks transferred
-                    session.progress(filename, ProgressInfo.Direction.IN, cis.chunkBytesRead(), totalSize);
+                    session.progress(filename + '-' + fileSeqNum, ProgressInfo.Direction.IN, cis.chunkBytesRead(), totalSize);

Review comment:
       This is needed here because without it, the output in netstats look like this, which is wrong:
   
   ```
   Repair ec3d7e50-d667-11ea-b3d0-8f5940ba25d7
       /127.0.0.1
           Receiving 3 files, 1890453 bytes total. Already received 2 files (66.67%), 528363 bytes total (53.09%)
               netstats_test/test_table 528363/528363 bytes (100%) received from idx:0/127.0.0.1
   ```
   
   New output looks like this:
   
   ```
   Repair ec3d7e50-d667-11ea-b3d0-8f5940ba25d7
       /127.0.0.1
           Receiving 3 files, 1890453 bytes total. Already received 2 files (66.67%), 1003673 bytes total (53.09%)
               netstats_test/test_table-1 528363/528363 bytes (100%) received from idx:0/127.0.0.1
               netstats_test/test_table-0 221727/221727 bytes (100%) received from idx:0/127.0.0.1
               netstats_test/test_table-2 253583/529137 bytes (47%) received from idx:0/127.0.0.1
   ```
   
   The problem with the original code is that `netstats_test/test_table` is periodically put into `SessionInfo#updateProgress` but since we are putting there same "file name", it is replaced so there is ever just one entry in that map.
   
   "file name" is not completely clear here, it is "logical file name" because it is not fully known yet where that will be be actually saved, the original "file name" does not make sense anyway ... I am appeding the sequence number just for the sake of having it unique.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic closed pull request #558: CASSANDRA-15406 - added progress of streaming in percents in netstats command

Posted by GitBox <gi...@apache.org>.
smiklosovic closed pull request #558:
URL: https://github.com/apache/cassandra/pull/558


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a change in pull request #558: CASSANDRA-15406 - added progress of streaming in percents in netstats command

Posted by GitBox <gi...@apache.org>.
smiklosovic commented on a change in pull request #558:
URL: https://github.com/apache/cassandra/pull/558#discussion_r465325235



##########
File path: src/java/org/apache/cassandra/streaming/ProgressInfo.java
##########
@@ -110,7 +110,7 @@ public String toString(boolean withPorts)
     {
         StringBuilder sb = new StringBuilder(fileName);
         sb.append(" ").append(currentBytes);
-        sb.append("/").append(totalBytes).append(" bytes");
+        sb.append("/").append(totalBytes).append(" bytes ");

Review comment:
       looks like this
   
   ```
   netstats_test/test_table 528363/528363 bytes (100%) received from idx:0/127.0.0.1
   ```
   
   instead of 
   
   ```
   netstats_test/test_table 528363/528363 bytes(100%) received from idx:0/127.0.0.1
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on pull request #558: CASSANDRA-15406 - added progress of streaming in percents in netstats command

Posted by GitBox <gi...@apache.org>.
smiklosovic commented on pull request #558:
URL: https://github.com/apache/cassandra/pull/558#issuecomment-670089826


   replaced by https://github.com/apache/cassandra/pull/711


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a change in pull request #558: CASSANDRA-15406 - added progress of streaming in percents in netstats command

Posted by GitBox <gi...@apache.org>.
smiklosovic commented on a change in pull request #558:
URL: https://github.com/apache/cassandra/pull/558#discussion_r465325467



##########
File path: src/java/org/apache/cassandra/streaming/SessionInfo.java
##########
@@ -149,6 +149,14 @@ public long getTotalSizeToReceive()
         return getTotalSizes(receivingSummaries);
     }
 
+    public long getTotalBytesToReceive()

Review comment:
       without this method, the progress was not computed correctly.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org