summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2022-04-05 11:04:04 +0200
committerMartin Polden <mpolden@mpolden.no>2022-04-05 14:07:58 +0200
commitb1084cec06681d05a6f822d32acf0390691cdc50 (patch)
treeaa2aea069d91ca3e73b2b23030aba3cef7fab723 /controller-server
parent49e7a8c8cee5e93317593bbd1253f555327e7482 (diff)
Make max application package size configurable
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ZipEntries.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ZipEntries.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ZipEntries.java
index e35cb55b87a..d10c5cb3e1a 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ZipEntries.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ZipEntries.java
@@ -58,8 +58,8 @@ public class ZipEntries {
public static ZipEntries from(byte[] zip, Predicate<String> entryNameMatcher, int maxEntrySizeInBytes, boolean throwIfEntryExceedsMaxSize) {
Options options = Options.standard()
.pathPredicate(entryNameMatcher)
- .sizeLimit(2 * (long) Math.pow(1024, 3)) // 2 GB
- .entrySizeLimit(maxEntrySizeInBytes)
+ .maxSize(2 * (long) Math.pow(1024, 3)) // 2 GB
+ .maxEntrySize(maxEntrySizeInBytes)
.truncateEntry(!throwIfEntryExceedsMaxSize);
List<ZipEntryWithContent> entries = new ArrayList<>();
try (ArchiveStreamReader reader = ArchiveStreamReader.ofZip(new ByteArrayInputStream(zip), options)) {