Skip to content

Commit

Permalink
Fix OOM when creating admin report zip bundle
Browse files Browse the repository at this point in the history
Use temp files when storing files in ZipFileSystem instead of in-memory ByteArrayOutputStream
  • Loading branch information
andreikoval committed Feb 13, 2019
1 parent 63883f3 commit 276510b
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -82,8 +82,9 @@ public void dump( Set<String> classifiers, Path destination, DiagnosticsReporter
estimateSizeAndCheckAvailableDiskSpace( destination, progress, sources, destinationFolder, force );

// Compress all files to destination
Map<String,String> env = new HashMap<>();
Map<String, Object> env = new HashMap<>();
env.put( "create", "true" );
env.put( "useTempFile", Boolean.TRUE );

// NOTE: we need the toUri() in order to handle windows file paths
URI uri = URI.create("jar:file:" + destination.toAbsolutePath().toUri().getRawPath() );
Expand Down

0 comments on commit 276510b

Please sign in to comment.