IMPALA-843: Do not close reader contexts until plan fragment close

Fixes a crash that occurs in some cases when io buffers are still used and
child nodes are closed early. We close child nodes early when all rows have
been consumed and resources are transfered, but in some cases io buffers are
still in use when a scan node is closed. We avoid this problem by only
closing reader contexts when the entire fragment is closed.

Change-Id: Ie62cdecdcd530bdc61dd4e83cd9ecfc7d2c93ef6
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1806
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 66f14a47b953b7b7153c73f4e018d03461dcd5ef)
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1859
This commit is contained in:
Matthew Jacobs
2014-03-11 12:22:10 -07:00
committed by jenkins
parent e817c3742c
commit 8fa8a0f828
7 changed files with 39 additions and 8 deletions

View File

@@ -795,3 +795,13 @@ int, bigint
1,1
2,3
====
---- QUERY
# IMPALA-843: Impalads crash while running join on string column + union
select count(*) from
(select 1 FROM alltypes AS t1 JOIN alltypestiny AS t2 ON t1.string_col = t2.string_col
UNION ALL SELECT 1 FROM tinytable AS t1) as t3
---- TYPES
bigint
---- RESULTS
5843
====