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 - - -
- - -

Build/Test/Documentation/Style Improvements (click to expand)

- -
- -* 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) - -
- - -**[Full Changelog (4.8.6.0...4.8.10.0)](https://github.com/FoundationDB/fdb-record-layer/compare/4.8.6.0...4.8.10.0)** - -#### Mixed Mode Test Results - -Mixed mode testing run against the following previous versions: - -❌`4.6.4.0`, ❌`4.6.5.0`, ❌`4.7.1.0`, ❌`4.7.2.0`, ✅`4.7.3.0`, ✅`4.8.1.0`, ✅`4.8.2.0`, ✅`4.8.3.0`, ✅`4.8.5.0`, ✅`4.8.6.0` - -[See full test run](https://github.com/FoundationDB/fdb-record-layer/actions/runs/19108664941) - - - ### 4.8.6.0

New Features