Bug 955363
Summary: | Uploading of file content using remote API/CLI requires many times more heap then file size | ||
---|---|---|---|
Product: | [JBoss] JBoss Operations Network | Reporter: | Larry O'Leary <loleary> |
Component: | CLI | Assignee: | Thomas Segismont <tsegismo> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | JON 3.1.2 | CC: | lzoubek, tsegismo |
Target Milestone: | ER02 | Keywords: | NeedsTestCase |
Target Release: | JON 3.2.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-01-02 20:37:15 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Larry O'Leary
2013-04-22 21:13:02 UTC
Fixed in master commit 0b99feed5411fe1b3437f9e64953c4818a5a4289 Author: Thomas Segismont <tsegismo> Date: Tue Sep 10 10:15:52 2013 +0200 The CLI uses JBoss Remoting to communicate with the server. JBoss Remoting relies on JDK's HttpUrlConnection when configured for the HTTP transport. But HttpUrlConnection copies the full payload of the HTTP request in memory before sending it to the server. Therefore, when you send a huge file, you can easily reach the maximum heap. Another problem was that the CLI itself was loading the file in memory as well, just to compute the file checksum. Updated ResourceClientProxy to compute checksum on FileInputStream instead of file bytes. Created new methods in ContentManager to upload content in fragments, updated ResourceClientProxy accordingly. verified on JON 3.2.0.ER2 |