Merge branch 'stable-2.14' into stable-2.15

* stable-2.14:
  Add missing documentation of 'all' option on list projects REST API
  Evict database idle connections

Change-Id: I8750823c160168a52b8c96b7098c3701fa712e77
This commit is contained in:
David Pursehouse
2017-11-16 08:15:02 +09:00
2 changed files with 30 additions and 0 deletions

View File

@@ -324,6 +324,33 @@ GET /projects/?type=PERMISSIONS HTTP/1.0
}
----
All::
Get all projects, including those whose state is "HIDDEN".
+
.Request
----
GET /projects/?all HTTP/1.0
----
+
.Response
----
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json; charset=UTF-8
)]}'
{
"All-Projects" {
"id": "All-Projects",
"state": "ACTIVE"
},
"some-other-project": {
"id": "some-other-project",
"state": "HIDDEN"
}
}
----
[[get-project]]
=== Get Project
--

View File

@@ -138,6 +138,9 @@ public class DataSourceProvider implements Provider<DataSource>, LifecycleListen
MILLISECONDS.convert(30, SECONDS),
MILLISECONDS));
ds.setInitialSize(ds.getMinIdle());
long evictIdleTimeMs = 1000L * 60;
ds.setMinEvictableIdleTimeMillis(evictIdleTimeMs);
ds.setTimeBetweenEvictionRunsMillis(evictIdleTimeMs / 2);
ds.setValidationQuery(dst.getValidationQuery());
ds.setValidationQueryTimeout(5);
exportPoolMetrics(ds);