From 3a6f64f5e3917c272b7a08a5afce68d448847c57 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 31 Jul 2018 14:20:18 +0200 Subject: [PATCH 1/2] Set version to 2.14.12-SNAPSHOT Change-Id: I38d93a6c0b057d1e5cb6270e44b3786ae4dd83cc --- gerrit-acceptance-framework/pom.xml | 2 +- gerrit-extension-api/pom.xml | 2 +- gerrit-plugin-api/pom.xml | 2 +- gerrit-plugin-gwtui/pom.xml | 2 +- gerrit-war/pom.xml | 2 +- version.bzl | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gerrit-acceptance-framework/pom.xml b/gerrit-acceptance-framework/pom.xml index 3435627808..55f7ee6ebd 100644 --- a/gerrit-acceptance-framework/pom.xml +++ b/gerrit-acceptance-framework/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 2.14.11 + 2.14.12-SNAPSHOT jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/gerrit-extension-api/pom.xml b/gerrit-extension-api/pom.xml index 675a0326af..e6361bf4e3 100644 --- a/gerrit-extension-api/pom.xml +++ b/gerrit-extension-api/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 2.14.11 + 2.14.12-SNAPSHOT jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/gerrit-plugin-api/pom.xml b/gerrit-plugin-api/pom.xml index 8e9ebd922e..e2b1d993ce 100644 --- a/gerrit-plugin-api/pom.xml +++ b/gerrit-plugin-api/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 2.14.11 + 2.14.12-SNAPSHOT jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/gerrit-plugin-gwtui/pom.xml b/gerrit-plugin-gwtui/pom.xml index 01c89c0b5e..af2d76be10 100644 --- a/gerrit-plugin-gwtui/pom.xml +++ b/gerrit-plugin-gwtui/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-gwtui - 2.14.11 + 2.14.12-SNAPSHOT jar Gerrit Code Review - Plugin GWT UI Common Classes for Gerrit GWT UI Plugins diff --git a/gerrit-war/pom.xml b/gerrit-war/pom.xml index e96a650647..6f14747e26 100644 --- a/gerrit-war/pom.xml +++ b/gerrit-war/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 2.14.11 + 2.14.12-SNAPSHOT war Gerrit Code Review - WAR Gerrit WAR diff --git a/version.bzl b/version.bzl index bda1f9686a..52ac2f2afd 100644 --- a/version.bzl +++ b/version.bzl @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = "2.14.11" +GERRIT_VERSION = "2.14.12-SNAPSHOT" From ea1230d4ad2e7ad2796928174453051cd61ce24e Mon Sep 17 00:00:00 2001 From: Hector Oswaldo Caballero Date: Wed, 1 Aug 2018 07:07:45 -0400 Subject: [PATCH 2/2] DataSourceProvider: Validate connection So far, when sending a request to the database, it was possible to try to reuse an already closed connection which resulted in a 500 error. Validate connections are still valid when they are borrowed and returned to the connection pool. Change-Id: I3376c872f6183ff7392ca2c8e354ed71a481ce0f --- .../com/google/gerrit/server/schema/DataSourceProvider.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/schema/DataSourceProvider.java b/gerrit-server/src/main/java/com/google/gerrit/server/schema/DataSourceProvider.java index c62602860d..fa28844b24 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/schema/DataSourceProvider.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/schema/DataSourceProvider.java @@ -141,6 +141,8 @@ public class DataSourceProvider implements Provider, LifecycleListen long evictIdleTimeMs = 1000L * 60; ds.setMinEvictableIdleTimeMillis(evictIdleTimeMs); ds.setTimeBetweenEvictionRunsMillis(evictIdleTimeMs / 2); + ds.setTestOnBorrow(true); + ds.setTestOnReturn(true); ds.setValidationQuery(dst.getValidationQuery()); ds.setValidationQueryTimeout(5); exportPoolMetrics(ds);