impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Fix parquet table writer dictionary leak
Date Tue, 28 Feb 2017 23:51:48 GMT
Tim Armstrong has posted comments on this change.

Change subject: Fix parquet table writer dictionary leak
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/6181/2//COMMIT_MSG
Commit Message:

Line 7: Fix parquet table writer dictionary leak
JIRA?


http://gerrit.cloudera.org:8080/#/c/6181/1/be/src/exec/hdfs-table-sink.cc
File be/src/exec/hdfs-table-sink.cc:

Line 579:     OutputPartition* partition = new OutputPartition();
> The issue is that the OutputPartition is passed down to the table writers, 
The OutputPartition owns the HdfsTableWriter via a scoped_ptr so we can safely use a raw OutputPartition*
pointer in HdfsTableWriter. This pattern of an owning unique_ptr/scoped_ptr in one direction
and a raw pointer for the inverse shows up elsewhere in the code (e.g. for "parent" pointers).


I'd probably add a comment on HdfsTableWriter.output_ to note that ownership relationship
but I think that would be clear and safe.


-- 
To view, visit http://gerrit.cloudera.org:8080/6181
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I06e354086ad24071d4fbf823f25f5df23933688f
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Joe McDonnell <joemcdonnell@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <joemcdonnell@cloudera.com>
Gerrit-Reviewer: Lars Volker <lv@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message