diff --git a/Cargo.toml b/Cargo.toml index 47c428a..4f5385f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,8 +29,8 @@ caching-persistent = ["caching", "dep:redb"] [dependencies] tracing = "0.1" -gcloud-sdk = { version = "0.24", features = ["google-firestore-v1"] } -hyper = { version ="0.14" } +gcloud-sdk = { version = "0.24.5", features = ["google-firestore-v1"] } +hyper = { version = "0.14" } struct-path = "0.2" rvstruct = "0.3.2" rsb_derive = "0.5" diff --git a/src/db/aggregated_query.rs b/src/db/aggregated_query.rs index db9e95a..ef8ca42 100644 --- a/src/db/aggregated_query.rs +++ b/src/db/aggregated_query.rs @@ -292,6 +292,7 @@ impl FirestoreDb { query_type: Some(gcloud_sdk::google::firestore::v1::structured_aggregation_query::QueryType::StructuredQuery(params.query_params.into())), } )), + explain_options: None, })) } @@ -338,23 +339,23 @@ impl FirestoreDb { } Err(err) => match err { FirestoreError::DatabaseError(ref db_err) - if db_err.retry_possible && retries < self.inner.options.max_retries => - { - warn!( + if db_err.retry_possible && retries < self.inner.options.max_retries => + { + warn!( err = %db_err, current_retry = retries + 1, max_retries = self.inner.options.max_retries, "Failed to run aggregation query. Retrying up to the specified number of times.", ); - self.stream_aggregated_query_doc_with_retries(params, retries + 1, span) - .await - } + self.stream_aggregated_query_doc_with_retries(params, retries + 1, span) + .await + } _ => Err(err), }, } } - .boxed() + .boxed() } fn aggregated_query_doc_with_retries<'a>( @@ -402,23 +403,23 @@ impl FirestoreDb { } Err(err) => match err { FirestoreError::DatabaseError(ref db_err) - if db_err.retry_possible && retries < self.inner.options.max_retries => - { - warn!( + if db_err.retry_possible && retries < self.inner.options.max_retries => + { + warn!( err = %db_err, current_retry = retries + 1, max_retries = self.inner.options.max_retries, "Failed to run aggregation query. Retrying up to the specified number of times.", ); - self.aggregated_query_doc_with_retries(params, retries + 1, span) - .await - } + self.aggregated_query_doc_with_retries(params, retries + 1, span) + .await + } _ => Err(err), }, } } - .boxed() + .boxed() } fn aggregated_response_to_doc(mut agg_res: RunAggregationQueryResponse) -> Option { diff --git a/src/db/query.rs b/src/db/query.rs index 80b7a43..67ba7ab 100644 --- a/src/db/query.rs +++ b/src/db/query.rs @@ -86,6 +86,7 @@ impl FirestoreDb { .map(|selector| selector.try_into()) .transpose()?, query_type: Some(run_query_request::QueryType::StructuredQuery(params.into())), + explain_options: None, })) } diff --git a/src/db/query_models.rs b/src/db/query_models.rs index 0f278d0..42a1ac1 100644 --- a/src/db/query_models.rs +++ b/src/db/query_models.rs @@ -78,6 +78,7 @@ impl From for StructuredQuery { .collect(), }, r#where: query_filter, + find_nearest: None, } } }