hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject hive git commit: HIVE-17411 : LLAP IO may incorrectly release a refcount in some rare cases (Sergey Shelukhin, reviewed by Prasanth Jayachandran)
Date Wed, 30 Aug 2017 19:10:52 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2.3 910842f84 -> dee0a20c4


HIVE-17411 : LLAP IO may incorrectly release a refcount in some rare cases (Sergey Shelukhin,
reviewed by Prasanth Jayachandran)


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

Branch: refs/heads/branch-2.3
Commit: dee0a20c41ca1ac75c13891d98bd2a1949d2528c
Parents: 910842f
Author: sergey <sershe@apache.org>
Authored: Wed Aug 30 10:33:46 2017 -0700
Committer: sergey <sershe@apache.org>
Committed: Wed Aug 30 12:10:42 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java      | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/dee0a20c/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
index 9b074e9..1252e40 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java
@@ -1133,8 +1133,11 @@ class EncodedReaderImpl implements EncodedReader {
     // as long as they are still in the same stream and are not already released.
     DiskRangeList prev = cc.prev;
     while (true) {
-      if ((prev == null) || (prev.getEnd() <= streamStartOffset)
-          || !(prev instanceof CacheChunk)) break;
+      // Do not release beyond current stream (we don't know which RGs that buffer is for).
+      if ((prev == null) || (prev.getEnd() <= streamStartOffset)) break;
+      // Only release cache chunks; do not release ProcCacheChunks - they may not yet have
data.
+      if (prev.getClass() != CacheChunk.class) break;
+
       CacheChunk prevCc = (CacheChunk)prev;
       if (prevCc.buffer == null) break;
       try {


Mime
View raw message