Skip to content

Commit dc9cff6

Browse files
committed
removed unused fn, fix typo
1 parent bfc5b84 commit dc9cff6

File tree

5 files changed

+5
-27
lines changed

5 files changed

+5
-27
lines changed

crates/connectors/ndc-postgres/src/mutation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub async fn mutation(
5454

5555
let pool = state
5656
.pool
57-
.aquire(&request_arguments, &state.query_metrics)
57+
.acquire(&request_arguments, &state.query_metrics)
5858
.await
5959
.map_err(|err| {
6060
record::pool_aquisition_error(&err, &state.query_metrics);

crates/connectors/ndc-postgres/src/mutation/explain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub async fn explain(
4444
})?;
4545
let pool = state
4646
.pool
47-
.aquire(&request_arguments, &state.query_metrics)
47+
.acquire(&request_arguments, &state.query_metrics)
4848
.await
4949
.map_err(|err| {
5050
record::pool_aquisition_error(&err, &state.query_metrics);

crates/connectors/ndc-postgres/src/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub async fn query(
5454

5555
let pool = state
5656
.pool
57-
.aquire(&request_arguments, &state.query_metrics)
57+
.acquire(&request_arguments, &state.query_metrics)
5858
.await
5959
.map_err(|err| {
6060
record::pool_aquisition_error(&err, &state.query_metrics);

crates/connectors/ndc-postgres/src/query/explain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub async fn explain(
4343
.await?;
4444
let pool = state
4545
.pool
46-
.aquire(&request_arguments, &state.query_metrics)
46+
.acquire(&request_arguments, &state.query_metrics)
4747
.await
4848
.map_err(|err| {
4949
record::pool_aquisition_error(&err, &state.query_metrics);

crates/connectors/ndc-postgres/src/state.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl Pool {
195195
}
196196
}
197197

198-
pub async fn aquire(
198+
pub async fn acquire(
199199
&self,
200200
request_arguments: &Option<BTreeMap<ArgumentName, serde_json::Value>>,
201201
metrics: &metrics::Metrics,
@@ -427,28 +427,6 @@ impl Pool {
427427
}
428428
}
429429

430-
/// Given the database info, return a label for metrics purposes
431-
/// This label is derived from the connection string, but with the password redacted
432-
/// Note that we do not guarantee uniqueness: two connection strings to the same db could have different query parameters
433-
/// This would result in each potentially getting their own pool, but sharing a label. I'm unsure what the concrete impact would be.
434-
fn get_pool_label(database_info: &DatabaseInfo) -> String {
435-
format!(
436-
"{}@{}:{}/{}",
437-
database_info
438-
.server_username
439-
.as_deref()
440-
.unwrap_or("<username>"),
441-
database_info.server_host.as_deref().unwrap_or("<host>"),
442-
database_info
443-
.server_port
444-
.map_or("<port>".to_string(), |port| port.to_string()),
445-
database_info
446-
.server_database
447-
.as_deref()
448-
.unwrap_or("<database>")
449-
)
450-
}
451-
452430
#[derive(Debug, thiserror::Error)]
453431
pub enum PoolAquisitionError {
454432
#[error("Missing required request argument: {0}")]

0 commit comments

Comments
 (0)