From f6506ad6d286b555d2e35154dfee05cb8024d29c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wa=C5=9B?= Date: Sat, 18 May 2024 10:40:13 +0200 Subject: [PATCH] Sync JVM options with Trino defaults --- charts/trino/templates/configmap-coordinator.yaml | 8 ++++++++ charts/trino/templates/configmap-worker.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/charts/trino/templates/configmap-coordinator.yaml b/charts/trino/templates/configmap-coordinator.yaml index ac380a8b..eaaf255b 100644 --- a/charts/trino/templates/configmap-coordinator.yaml +++ b/charts/trino/templates/configmap-coordinator.yaml @@ -32,6 +32,14 @@ data: -Djdk.nio.maxCachedBufferSize=2000000 # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading + {{/* only check the version number if the image is not overriden in any way */}} + {{- with .Values.image -}} + {{- if and (eq .repository "trinodb/trino") (not .useRepositoryAsSoleImageReference) (not .registry) (not .digest) (gt (default $.Chart.AppVersion .tag | int ) 447 ) }} + # https://bugs.openjdk.org/browse/JDK-8329528 + -XX:+UnlockDiagnosticVMOptions + -XX:G1NumCollectionsKeepPinned=10000000 + {{- end }}{{/* if */}} + {{- end }}{{/* with */}} {{- range $configValue := .Values.coordinator.additionalJVMConfig }} {{ $configValue }} {{- end }} diff --git a/charts/trino/templates/configmap-worker.yaml b/charts/trino/templates/configmap-worker.yaml index 2115bdee..e209f223 100644 --- a/charts/trino/templates/configmap-worker.yaml +++ b/charts/trino/templates/configmap-worker.yaml @@ -33,6 +33,14 @@ data: -Djdk.nio.maxCachedBufferSize=2000000 # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading + {{/* only check the version number if the image is not overriden in any way */}} + {{- with .Values.image -}} + {{- if and (eq .repository "trinodb/trino") (not .useRepositoryAsSoleImageReference) (not .registry) (not .digest) (gt (default $.Chart.AppVersion .tag | int ) 447 ) }} + # https://bugs.openjdk.org/browse/JDK-8329528 + -XX:+UnlockDiagnosticVMOptions + -XX:G1NumCollectionsKeepPinned=10000000 + {{- end }}{{/* if */}} + {{- end }}{{/* with */}} {{- range $configValue := .Values.worker.additionalJVMConfig }} {{ $configValue }} {{- end }}