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

ORC-1600: Reduce getStaticMemoryManager sync block in OrcFile #1768

Closed
wants to merge 1 commit into from

Conversation

cxzl25
Copy link
Contributor

@cxzl25 cxzl25 commented Jan 22, 2024

What changes were proposed in this pull request?

Improve calling efficiency of org.apache.orc.OrcFile#getStaticMemoryManager.

Why are the changes needed?

org.apache.orc.OrcFile#getStaticMemoryManager is a static method with synchronized. It needs to be locked every time it is called. This is unnecessary.

How was this patch tested?

GA

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the JAVA label Jan 22, 2024
@dongjoon-hyun dongjoon-hyun added this to the 2.0.0 milestone Jan 22, 2024
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

dongjoon-hyun pushed a commit that referenced this pull request Jan 22, 2024
### What changes were proposed in this pull request?
Improve calling efficiency of `org.apache.orc.OrcFile#getStaticMemoryManager`.

### Why are the changes needed?
`org.apache.orc.OrcFile#getStaticMemoryManager` is a static method with synchronized. It needs to be locked every time it is called. This is unnecessary.

### How was this patch tested?
GA

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #1768 from cxzl25/ORC-1600.

Authored-by: sychen <sychen@ctrip.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit b5c2250)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member

Thank you, @cxzl25 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants