Skip to content

Conversation

@gf2121
Copy link
Contributor

@gf2121 gf2121 commented Dec 11, 2022

@gf2121 gf2121 changed the title [GH-14909]: [Java] Prevent potential memory leak of ListSubfieldEncoder and StructSubfieldEncoder GH-14909: [Java] Prevent potential memory leak of ListSubfieldEncoder and StructSubfieldEncoder Dec 11, 2022
@github-actions
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of old issues on JIRA the title also supports:

ARROW-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@github-actions
Copy link

@github-actions
Copy link

⚠️ GitHub issue #14909 has been automatically assigned in GitHub to PR creator.

@github-actions
Copy link

⚠️ GitHub issue #14909 has no components, please add labels for components.

try (final ListVector encoded = (ListVector) encoder.encodeListSubField(vector)) {
fail("There should be an exception when encoding");
} catch (Exception e) {
assertEquals("Dictionary encoding not defined for value:" + 20, e.getMessage());
Copy link
Member

Choose a reason for hiding this comment

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

nit: why concat here, when the string is fully hardcoded below?

Comment on lines 161 to 162
decoded.close();
throw e;
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps use AutoCloseables#close(Throwable, AutoCloseable...) for this kind of thing?

@lidavidm lidavidm merged commit c7eddff into apache:master Dec 12, 2022
@ursabot
Copy link

ursabot commented Dec 14, 2022

Benchmark runs are scheduled for baseline = 6f86fce and contender = c7eddff. c7eddff is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.0% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.0% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] c7eddff9 ec2-t3-xlarge-us-east-2
[Finished] c7eddff9 test-mac-arm
[Finished] c7eddff9 ursa-i9-9960x
[Finished] c7eddff9 ursa-thinkcentre-m75q
[Finished] 6f86fce8 ec2-t3-xlarge-us-east-2
[Finished] 6f86fce8 test-mac-arm
[Finished] 6f86fce8 ursa-i9-9960x
[Finished] 6f86fce8 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
…ncoder and StructSubfieldEncoder (apache#14910)

* Closes: apache#14909

Authored-by: 郭峰 <[email protected]>
Signed-off-by: David Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java] ListSubfieldEncoder and StructSubfieldEncoder may leak memory when exception thrown

3 participants