[JAVA-5280] Reclaim native memory quicker when using ZlibCompressor Created: 02/Jan/24 Updated: 10/Jan/24 Resolved: 10/Jan/24 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Internal |
| Affects Version/s: | None |
| Fix Version/s: | 4.11.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Documentation Changes: | Not Needed |
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
|
Originally reported via PR: https://github.com/mongodb/mongo-java-driver/pull/1285 Since the driver creates the java.util.zip.Deflater instance, it's responsible for calling Deflater#end |
| Comments |
| Comment by Githook User [ 10/Jan/24 ] |
|
Author: {'name': 'raelg', 'email': '344980+raelg@users.noreply.github.com', 'username': 'raelg'}Message: Reclaim native memory quicker when using ZlibCompressor (#1285) Reclaim native memory quicker by overriding close() on DeflaterOutputStream to invoke end() on the Deflater, since by supplying a deflater to the constructor of DeflaterOutputStream usesDefaultDeflater is set to false and therefore end() is not invoked in DeflaterOutputStream#close.
|
| Comment by Githook User [ 10/Jan/24 ] |
|
Author: {'name': 'raelg', 'email': '344980+raelg@users.noreply.github.com', 'username': 'raelg'}Message: Reclaim native memory quicker when using ZlibCompressor (#1285) Reclaim native memory quicker by overriding close() on DeflaterOutputStream to invoke end() on the Deflater, since by supplying a deflater to the constructor of DeflaterOutputStream usesDefaultDeflater is set to false and therefore end() is not invoked in DeflaterOutputStream#close.
|