hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lil...@apache.org
Subject [1/3] incubator-hawq git commit: HAWQ-407. Fix memory leak in parquet metadata processing for reading table with data
Date Wed, 17 Feb 2016 02:17:18 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 2968e5154 -> 4c3a09180


HAWQ-407. Fix memory leak in parquet metadata processing for reading table with data


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

Branch: refs/heads/master
Commit: 9defbc12a818971b31ab402ea0935b1ff266589f
Parents: 95a5da1
Author: Lili Ma <ictmalili@gmail.com>
Authored: Mon Feb 15 14:59:32 2016 +0800
Committer: Lili Ma <ictmalili@gmail.com>
Committed: Mon Feb 15 14:59:32 2016 +0800

----------------------------------------------------------------------
 src/backend/access/parquet/parquetam.c       | 4 ++--
 src/backend/cdb/cdbparquetfooterprocessor.c  | 3 +++
 src/backend/cdb/cdbparquetfooterserializer.c | 4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9defbc12/src/backend/access/parquet/parquetam.c
----------------------------------------------------------------------
diff --git a/src/backend/access/parquet/parquetam.c b/src/backend/access/parquet/parquetam.c
index 67359ca..6438e32 100644
--- a/src/backend/access/parquet/parquetam.c
+++ b/src/backend/access/parquet/parquetam.c
@@ -583,8 +583,8 @@ ParquetInsertDesc parquet_insert_init(Relation rel, ResultRelSegFileInfo
*segfil
 	parquetInsertDesc->aoEntry = aoentry;
 	parquetInsertDesc->insertCount = 0;
 
-	parquetInsertDesc->parquetMetadata = (struct ParquetMetadata_4C *)
-			palloc0(sizeof(struct ParquetMetadata_4C));
+//	parquetInsertDesc->parquetMetadata = (struct ParquetMetadata_4C *)
+//			palloc0(sizeof(struct ParquetMetadata_4C));
 	/*SHOULD CALL OPEN METADATA FILE HERE, AND GET parquetMetadata INFO*/
 
 	initStringInfo(&titleBuf);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9defbc12/src/backend/cdb/cdbparquetfooterprocessor.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbparquetfooterprocessor.c b/src/backend/cdb/cdbparquetfooterprocessor.c
index 510a65f..691534a 100644
--- a/src/backend/cdb/cdbparquetfooterprocessor.c
+++ b/src/backend/cdb/cdbparquetfooterprocessor.c
@@ -111,6 +111,9 @@ bool readParquetFooter(File fileHandler, ParquetMetadata *parquetMetadata,
 
 	DetectHostEndian();
 
+  *parquetMetadata = (struct ParquetMetadata_4C *)
+      palloc0(sizeof(struct ParquetMetadata_4C));
+
 	/* if file size is 0, means there's no data in file, return false*/
 	if (eof == 0)
 		return false;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9defbc12/src/backend/cdb/cdbparquetfooterserializer.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbparquetfooterserializer.c b/src/backend/cdb/cdbparquetfooterserializer.c
index 8677078..247bbb1 100644
--- a/src/backend/cdb/cdbparquetfooterserializer.c
+++ b/src/backend/cdb/cdbparquetfooterserializer.c
@@ -167,8 +167,8 @@ void initDeserializeFooter(
 
 	initCompactProtocol(*footerProtocol, file, fileName, footerLength, PARQUET_FOOTER_BUFFERMODE_READ);
 
-	*parquetMetadata =
-			(struct ParquetMetadata_4C*) palloc0(sizeof(struct ParquetMetadata_4C));
+//	*parquetMetadata =
+//			(struct ParquetMetadata_4C*) palloc0(sizeof(struct ParquetMetadata_4C));
 
 	readParquetFileMetadata(parquetMetadata, *footerProtocol);
 }


Mime
View raw message