Abhishek Rawat has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19087 )

Change subject: IMPALA-11631 Fix impala crashes in 
impala::TopNNode::Heap::Close()
......................................................................


Patch Set 1:

(1 comment)

The fix looks good. Ideally, we could use smart pointers properly and not run 
into these issues. But, that would require some restructuring.

For instance, having a destructor for TopNNode::Heap::~Heap() (which could 
basically call TopNNode::Heap::Close()). TopNNode::Close() could then simply 
call partition_heaps_.clear() instead of looping through them and calling 
TopNNode::Heap::Close()

http://gerrit.cloudera.org:8080/#/c/19087/1/be/src/exec/topn-node.cc
File be/src/exec/topn-node.cc:

http://gerrit.cloudera.org:8080/#/c/19087/1/be/src/exec/topn-node.cc@695
PS1, Line 695:
Would be good to add a comment before the second loop otherwise someone could 
try to optimize it in future. So something like:
"Only move heaps from partition_heap_ to rematerialized_heaps once all have 
been rematerialized. Otherwise, in case of an error, we could double free 
entries in partition_heap_."



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaf45b6ef777f68e1843c076a935e4189acc6990b
Gerrit-Change-Number: 19087
Gerrit-PatchSet: 1
Gerrit-Owner: Yida Wu <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Comment-Date: Fri, 30 Sep 2022 22:06:54 +0000
Gerrit-HasComments: Yes

Reply via email to