You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2013/03/29 15:58:32 UTC
[2/3] git commit: Fix streaming compressed files when using
encryption; patch by yukim reviewed by iamaleksey for CASSANDRA-5391
Fix streaming compressed files when using encryption; patch by yukim reviewed by iamaleksey for CASSANDRA-5391
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cc6429e2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cc6429e2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cc6429e2
Branch: refs/heads/trunk
Commit: cc6429e2722e764dce8cad77660732146ed596ab
Parents: 6de0495
Author: Yuki Morishita <yu...@apache.org>
Authored: Fri Mar 29 09:58:07 2013 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Fri Mar 29 09:58:07 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../compress/CompressedFileStreamTask.java | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc6429e2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 400e5c3..dafb9a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,7 @@
* Fix validation for IN where clauses with collections (CASSANDRA-5376)
* Copy resultSet on count query to avoid ConcurrentModificationException (CASSANDRA-5382)
* Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
+ * Fix streaming compressed files when using encryption (CASSANDRA-5391)
Merged from 1.1:
* cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
* Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc6429e2/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java b/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
index dda9d7d..2551ca0 100644
--- a/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
+++ b/src/java/org/apache/cassandra/streaming/compress/CompressedFileStreamTask.java
@@ -92,6 +92,7 @@ public class CompressedFileStreamTask extends FileStreamTask
}
else
{
+ file.seek(section.left);
// NIO is not available. Fall back to normal streaming.
// This happens when inter-node encryption is turned on.
if (transferBuffer == null)
@@ -106,6 +107,9 @@ public class CompressedFileStreamTask extends FileStreamTask
header.file.progress += lastWrite;
}
+ if (sc == null)
+ socket.getOutputStream().flush();
+
logger.debug("Bytes transferred " + bytesTransferred + "/" + header.file.size);
}
StreamingMetrics.totalOutgoingBytes.inc(totalBytesTransferred);