Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2AA0010813 for ; Mon, 20 Jan 2014 17:31:12 +0000 (UTC) Received: (qmail 62299 invoked by uid 500); 20 Jan 2014 17:31:06 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 62187 invoked by uid 500); 20 Jan 2014 17:31:05 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 62168 invoked by uid 99); 20 Jan 2014 17:31:05 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2014 17:31:05 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B56E4508C8; Mon, 20 Jan 2014 17:31:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Mon, 20 Jan 2014 17:31:04 -0000 Message-Id: <093966c6cab1496c923b5d0b44576105@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/8] git commit: ACCUMULO-1998 Defense against concurrent write() and close() by relying on DfsLogger output stream interaction Updated Branches: refs/heads/1.5.1-SNAPSHOT 52ef7c6e0 -> 1f99e6e14 refs/heads/1.6.0-SNAPSHOT 71b2baec7 -> 420d7db3b refs/heads/master ba9bfa938 -> 0d7312e32 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/master Commit: cac60938f08a1ce40bbbc0e89c2d01ee8350fd1a Parents: 8ead5c6 Author: John Vines Authored: Thu Jan 16 16:03:35 2014 -0500 Committer: John Vines 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();