Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix](agg) fix bitmap agg core dump when phmap pointer assert alignment #13381

Merged
merged 2 commits into from
Oct 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion be/src/vec/exec/vaggregation_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ Status AggregationNode::open(RuntimeState* state) {
// this could cause unable to get JVM
if (_probe_expr_ctxs.empty()) {
_create_agg_status(_agg_data.without_key);
_agg_data_created_without_key = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use _probe_expr_ctxs.empty() as indicator, and do not introduce a new variable _agg_data_created_without_key.

}
bool eos = false;
Block block;
Expand Down Expand Up @@ -707,7 +708,13 @@ void AggregationNode::_update_memusage_without_key() {
}

void AggregationNode::_close_without_key() {
_destroy_agg_status(_agg_data.without_key);
//because prepare maybe failed, and couldn't create agg data.
//but finally call close to destory agg data, if agg data has bitmapValue
//will be core dump, it's not initialized
if (_agg_data_created_without_key) {
_destroy_agg_status(_agg_data.without_key);
_agg_data_created_without_key = false;
}
release_tracker();
}

Expand Down
1 change: 1 addition & 0 deletions be/src/vec/exec/vaggregation_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ class AggregationNode : public ::doris::ExecNode {

bool _should_limit_output = false;
bool _reach_limit = false;
bool _agg_data_created_without_key = false;

PODArray<AggregateDataPtr> _places;
std::vector<char> _deserialize_buffer;
Expand Down