Skip to content

Use ZstdInputStreamNoFinalizer for Zstd decompression#1924

Merged
rozza merged 3 commits intomongodb:mainfrom
rozza:JAVA-6137
Mar 26, 2026
Merged

Use ZstdInputStreamNoFinalizer for Zstd decompression#1924
rozza merged 3 commits intomongodb:mainfrom
rozza:JAVA-6137

Conversation

@rozza
Copy link
Copy Markdown
Member

@rozza rozza commented Mar 24, 2026

Replace ZstdInputStream with ZstdInputStreamNoFinalizer to avoid deprecated Java finalization (JEP 421) and reduce GC overhead. The driver already closes the stream via try-with-resources, so the finalizer safety net is unnecessary.

JAVA-6137

Replace ZstdInputStream with ZstdInputStreamNoFinalizer to avoid
deprecated Java finalization (JEP 421) and reduce GC overhead.
The driver already closes the stream via try-with-resources, so
the finalizer safety net is unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rozza rozza requested a review from a team as a code owner March 24, 2026 13:52
@rozza rozza requested a review from nhachicha March 24, 2026 13:52
@rozza
Copy link
Copy Markdown
Member Author

rozza commented Mar 24, 2026

Note this PR was fully automated vi claude code using my jira-work skill. Then manually reviewed by myself.

@rozza
Copy link
Copy Markdown
Member Author

rozza commented Mar 26, 2026

Note: Note: The ZstdInputStream uses ZstdInputStreamNoFinalizer internally. See: https://github.com/luben/zstd-jni/blob/master/src/main/java/com/github/luben/zstd/ZstdInputStream.java - so this updates to just use the actual implementation.

@rozza rozza requested a review from nhachicha March 26, 2026 12:39
@rozza rozza merged commit 718c2c1 into mongodb:main Mar 26, 2026
53 checks passed
@rozza rozza deleted the JAVA-6137 branch March 26, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants