From 57414cc4f3ecdd33a00eda160543869d18229605 Mon Sep 17 00:00:00 2001 From: saxenakshitiz Date: Thu, 25 Aug 2022 20:40:53 +0530 Subject: [PATCH 1/2] chore: update helm config for postgres connection retry --- helm/templates/query-service-config.yaml | 3 ++- helm/values.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/helm/templates/query-service-config.yaml b/helm/templates/query-service-config.yaml index 5c72ef25..dff95b53 100644 --- a/helm/templates/query-service-config.yaml +++ b/helm/templates/query-service-config.yaml @@ -26,7 +26,8 @@ data: type = postgres connectionString = "{{ .Values.queryServiceConfig.data.postgresConnectionString }}" user = "{{ .Values.queryServiceConfig.data.postgresUser }}" - maxConnections = "{{ .Values.queryServiceConfig.data.postgresMaxConnections }}" + maxConnectionAttempts = "{{ .Values.queryServiceConfig.data.postgresMaxConnectionAttempts }}" + connectionRetryBackoff = "{{ .Values.queryServiceConfig.data.postgresConnectionRetryBackoff }}" } ] {{- if or .Values.handlers .Values.extraHandlers }} diff --git a/helm/values.yaml b/helm/values.yaml index 9505f8de..653b470f 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -68,7 +68,8 @@ queryServiceConfig: zookeeperConnectionString: zookeeper:2181/pinot/my-views postgresConnectionString: jdbc:postgresql://postgres:5432/postgres postgresUser: postgres - postgresMaxConnections: 5 + postgresMaxConnectionAttempts: 200 + postgresConnectionRetryBackoff: 5s tenantColumnName: tenant_id attributeClient: host: attribute-service From 270ef43b325234d07798f6cddf61c00578e2e5ac Mon Sep 17 00:00:00 2001 From: saxenakshitiz Date: Fri, 26 Aug 2022 11:09:02 +0530 Subject: [PATCH 2/2] Increase number of retries for pinot to fix test failure --- .../core/query/service/htqueries/HTPinotQueriesTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java b/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java index c257044c..557902a3 100644 --- a/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java +++ b/query-service/src/integrationTest/java/org/hypertrace/core/query/service/htqueries/HTPinotQueriesTest.java @@ -207,12 +207,12 @@ private static boolean bootstrapConfig() throws Exception { .collect(Collectors.toList()) .size() == 0 - && retry++ < 5) { + && retry++ < 10) { Thread.sleep(2000); } channel.shutdown(); bootstrapper.stop(); - return retry < 5; + return retry < 10; } private static boolean generateData() throws Exception {