accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject git commit: ACCUMULO-1998 Defense against concurrent write() and close() by relying on DfsLogger output stream interaction
Date Fri, 17 Jan 2014 21:00:35 GMT
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 8ead5c64d -> cac60938f


ACCUMULO-1998 Defense against concurrent write() and close() by relying on DfsLogger output
stream interaction


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/cac60938
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/cac60938
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/cac60938

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: cac60938f08a1ce40bbbc0e89c2d01ee8350fd1a
Parents: 8ead5c6
Author: John Vines <vines@apache.org>
Authored: Thu Jan 16 16:03:35 2014 -0500
Committer: John Vines <vines@apache.org>
Committed: Fri Jan 17 15:54:28 2014 -0500

----------------------------------------------------------------------
 .../apache/accumulo/core/security/crypto/BlockedOutputStream.java  | 2 +-
 .../src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/cac60938/core/src/main/java/org/apache/accumulo/core/security/crypto/BlockedOutputStream.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/BlockedOutputStream.java
b/core/src/main/java/org/apache/accumulo/core/security/crypto/BlockedOutputStream.java
index 1f3cf3b..ca72055 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/BlockedOutputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/BlockedOutputStream.java
@@ -55,7 +55,7 @@ public class BlockedOutputStream extends OutputStream {
       remainder = blockSize - remainder;
 
     // This is garbage
-    bb.position(bb.position() + remainder);
+    bb.position(size + remainder);
     out.write(bb.array(), 0, size + remainder);
 
     out.flush();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/cac60938/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index 3074614..e80cd15 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@ -440,7 +440,7 @@ public class DfsLogger {
 
     if (encryptingLogFile != null)
       try {
-        encryptingLogFile.close();
+        logFile.close();
       } catch (IOException ex) {
         log.error(ex);
         throw new LogClosedException();


Mime
View raw message