diff --git a/build.gradle b/build.gradle
index 430bdfd5f9..f73d8167ec 100644
--- a/build.gradle
+++ b/build.gradle
@@ -373,24 +373,29 @@ if (Boolean.parseBoolean(publishBuild) && Boolean.parseBoolean(centralPublish))
connection.setDoOutput(true)
connection.setRequestProperty('Authorization', "Bearer ${encodedCredentials}")
- def boundary = "----GradleBoundary${System.currentTimeMillis()}"
+ def boundary = "----GradleBoundary${UUID.randomUUID().toString()}"
connection.setRequestProperty('Content-Type', "multipart/form-data; boundary=${boundary}")
- connection.outputStream.withWriter('UTF-8') { writer ->
- writer.write("--${boundary}\r\n")
- writer.write("Content-Disposition: form-data; name=\"bundle\"; filename=\"${bundleFile.name}\"\r\n")
- writer.write("Content-Type: application/octet-stream\r\n")
- writer.write("\r\n")
- writer.flush()
+ // Use a chunked streaming mode to break data up into smaller chunks to avoid needing to load everything into memory
+ connection.setChunkedStreamingMode(8192)
- // Write the file bytes
- bundleFile.withInputStream { input ->
- connection.outputStream << input
- }
+ // Use buffered output stream and write directly to avoid loading entire file into memory
+ connection.outputStream.withStream { output ->
+ def CRLF = "\r\n"
+
+ // Write multipart headers
+ output.write("--${boundary}${CRLF}".getBytes('UTF-8'))
+ output.write("Content-Disposition: form-data; name=\"bundle\"; filename=\"${bundleFile.name}\"${CRLF}".getBytes('UTF-8'))
+ output.write("Content-Type: application/octet-stream${CRLF}".getBytes('UTF-8'))
+ output.write(CRLF.getBytes('UTF-8'))
+
+ // Next write the bundle data to the stream
+ bundleFile.withInputStream { InputStream input -> output << input }
- writer.write("\r\n")
- writer.write("--${boundary}--\r\n")
- writer.flush()
+ // Write multipart closing boundary
+ output.write(CRLF.getBytes('UTF-8'))
+ output.write("--${boundary}--${CRLF}".getBytes('UTF-8'))
+ output.flush()
}
def responseCode = connection.responseCode
diff --git a/docs/sphinx/source/ReleaseNotes.md b/docs/sphinx/source/ReleaseNotes.md
index 5f50f1ef76..521b0a62c8 100644
--- a/docs/sphinx/source/ReleaseNotes.md
+++ b/docs/sphinx/source/ReleaseNotes.md
@@ -7,39 +7,6 @@ As the [versioning guide](Versioning.md) details, it cannot always be determined
## 4.8
-### 4.8.10.0
-
-
-
-
-
-
-* Replace nexus publishing plugin with direct call to central sonatype uploading URL - [PR #3723](https://github.com/FoundationDB/fdb-record-layer/pull/3723)
-* Remove JReleaser publisher - [PR #3721](https://github.com/FoundationDB/fdb-record-layer/pull/3721)
-* Increase heap size for JReleaser - [PR #3720](https://github.com/FoundationDB/fdb-record-layer/pull/3720)
-* Clean up 4.8.4.0 and 4.8.7.0 release notes - [PR #3719](https://github.com/FoundationDB/fdb-record-layer/pull/3719)
-* Upload the jreleaser trace logs & config - [PR #3718](https://github.com/FoundationDB/fdb-record-layer/pull/3718)
-* Reduce test load to reduce flakiness - [PR #3712](https://github.com/FoundationDB/fdb-record-layer/pull/3712)
-* Update the release plugin to use the central publishing API directly - [PR #3710](https://github.com/FoundationDB/fdb-record-layer/pull/3710)
-
- Build/Test/Documentation/Style Improvements (click to expand)
-
-