Skip to content

Conversation

@amosbird
Copy link
Contributor

@amosbird amosbird commented May 28, 2022

Problem Summary:

Fix some memory leak issues in vectorized engine.

Checklist(Required)

  1. Does it affect the original behavior: (No)
  2. Has unit tests been added: (No Need)
  3. Has document been added or modified: (No Need)
  4. Does it need to update dependencies: (No)
  5. Are there any changes that cannot be rolled back: (No)

Further comments

The following leak issues are catched by running stress tests with tpch queries.

  1. HashJoinNode doesn't close owned expression contexts.
  2. VExprContext doesn't free owned function contexts.
  3. AggregationNode doesn't close owned aggregate_evaluators. Also it might fail to close properly.
  4. merging VExchangeNode doesn't close owned vsort_exec_exprs.
  5. VSortNode doesn't return error code if close fails.

There is also a related fix proposed in #9820 whose implementation differs from ExprContext. I think deallocation suits better inside d'tor, which is more consistent.

@morningman morningman added this to the v1.1 milestone May 28, 2022
@morningman morningman added the dev/1.0.1-deprecated should be merged into dev-1.0.1 branch label May 28, 2022
HappenLee
HappenLee previously approved these changes May 28, 2022
Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 28, 2022
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label May 29, 2022
@amosbird
Copy link
Contributor Author

Fix another case: VAnalyticEvalNode doesn't open and close properly.

@morningman
Copy link
Contributor

hi @amosbird , please rebase master to fix BE ut bug.

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 29, 2022
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@yiguolei yiguolei merged commit 63aab5e into apache:master May 29, 2022
@morningman morningman added dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 and removed dev/1.0.1-deprecated should be merged into dev-1.0.1 branch labels Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/vectorization dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants