You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by ji...@apache.org on 2015/10/10 09:59:13 UTC

incubator-hawq git commit: HAWQ-35. Handle a case when a large tuple across split boundary

Repository: incubator-hawq
Updated Branches:
  refs/heads/master fda0245fc -> a4d49c456


HAWQ-35. Handle a case when a large tuple across split boundary


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

Branch: refs/heads/master
Commit: a4d49c456aa78e7b39b1c5829805ba0eebdf41d1
Parents: fda0245
Author: Lirong Jian <ji...@gmail.com>
Authored: Sat Oct 10 15:34:09 2015 +0800
Committer: Lirong Jian <ji...@gmail.com>
Committed: Sat Oct 10 15:34:09 2015 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbappendonlystorageread.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a4d49c45/src/backend/cdb/cdbappendonlystorageread.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbappendonlystorageread.c b/src/backend/cdb/cdbappendonlystorageread.c
index e642ba1..c674293 100755
--- a/src/backend/cdb/cdbappendonlystorageread.c
+++ b/src/backend/cdb/cdbappendonlystorageread.c
@@ -1122,6 +1122,15 @@ bool AppendOnlyStorageRead_GetBlockInfo(
 	Assert(storageRead != NULL);
 	Assert(storageRead->isActive);
 
+	/*
+	 * If isUseSplitLen= true and readPosition>splitLen,then this block should not belong to this split.
+	 * We should read segment file for a new split.
+	 * This situation will occur when the previous block is the last block of a big tuple which is larger than read split  size(128MB).
+	 * It also means the last tuple cross splits and the rest of this split should handle for other vSeg not this vSeg.
+	 */
+	if (isUseSplitLen && storageRead->bufferedRead.largeReadPosition >= storageRead->bufferedRead.splitLen)
+	   return false;
+
 	isNext = AppendOnlyStorageRead_InternalGetBlockInfo(storageRead, isUseSplitLen);
 
 	/*
@@ -1452,7 +1461,7 @@ void AppendOnlyStorageRead_Content(
 										storageRead,
 										&header,
 										&content,
-										true);
+										isUseSplitLen);
 
 		if (!storageRead->current.isCompressed)
 		{