Skip to content

Commit

Permalink
Make poolSettings an explicit default
Browse files Browse the repository at this point in the history
  • Loading branch information
plcplc committed Mar 11, 2024
1 parent 78ce366 commit 5f9de83
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 4 deletions.
1 change: 0 additions & 1 deletion crates/configuration/src/version3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub const DEFAULT_CONNECTION_URI_VARIABLE: &str = "CONNECTION_URI";
pub struct RawConfiguration {
// Connection string for a Postgres-compatible database
pub connection_uri: ConnectionUri,
#[serde(skip_serializing_if = "PoolSettings::is_default")]
#[serde(default)]
pub pool_settings: PoolSettings,
#[serde(default)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ expression: schema
"$ref": "#/definitions/ConnectionUri"
},
"poolSettings": {
"$ref": "#/definitions/PoolSettings"
"default": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"allOf": [
{
"$ref": "#/definitions/PoolSettings"
}
]
},
"isolationLevel": {
"default": "ReadCommitted",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ expression: schema
"$ref": "#/definitions/ConnectionUri"
},
"poolSettings": {
"$ref": "#/definitions/PoolSettings"
"default": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"allOf": [
{
"$ref": "#/definitions/PoolSettings"
}
]
},
"isolationLevel": {
"default": "ReadCommitted",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ expression: default_configuration
"connectionUri": {
"variable": "MAGIC_URI"
},
"poolSettings": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"isolationLevel": "ReadCommitted",
"metadata": {
"tables": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ expression: generated_schema_json
"$ref": "#/components/schemas/ConnectionUri"
},
"poolSettings": {
"$ref": "#/components/schemas/PoolSettings"
"default": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"allOf": [
{
"$ref": "#/components/schemas/PoolSettings"
}
]
},
"isolationLevel": {
"default": "ReadCommitted",
Expand Down
6 changes: 6 additions & 0 deletions static/citus/v3-chinook-ndc-metadata/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"connectionUri": {
"variable": "CONNECTION_URI"
},
"poolSettings": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"isolationLevel": "ReadCommitted",
"metadata": {
"tables": {
Expand Down
6 changes: 6 additions & 0 deletions static/cockroach/v3-chinook-ndc-metadata/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"connectionUri": {
"variable": "CONNECTION_URI"
},
"poolSettings": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"isolationLevel": "ReadCommitted",
"metadata": {
"tables": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"connectionUri": {
"variable": "CONNECTION_URI"
},
"poolSettings": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"isolationLevel": "ReadCommitted",
"metadata": {
"tables": {},
Expand Down
6 changes: 6 additions & 0 deletions static/postgres/v3-chinook-ndc-metadata/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"connectionUri": {
"variable": "CONNECTION_URI"
},
"poolSettings": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"isolationLevel": "ReadCommitted",
"metadata": {
"tables": {
Expand Down
6 changes: 6 additions & 0 deletions static/yugabyte/v3-chinook-ndc-metadata/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"connectionUri": {
"variable": "CONNECTION_URI"
},
"poolSettings": {
"maxConnections": 50,
"poolTimeout": 30,
"idleTimeout": 180,
"connectionLifetime": 600
},
"isolationLevel": "ReadCommitted",
"metadata": {
"tables": {
Expand Down

0 comments on commit 5f9de83

Please sign in to comment.