Skip to content

Commit 0f8f1c8

Browse files
authored
[ENH] Remove retry log line in RFE (#3862)
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Log only on retries and not on first attempt - New functionality - ... ## Test plan *How are these changes tested?* - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes None
1 parent d9a0857 commit 0f8f1c8

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

rust/frontend/src/frontend.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,6 @@ impl Frontend {
838838
..
839839
}: CountRequest,
840840
) -> Result<CountResponse, QueryError> {
841-
tracing::info!("Retrying count() request for collection {}", collection_id);
842841
let collection_and_segments = self
843842
.collections_with_segments_provider
844843
.get_collection_with_segments(collection_id)
@@ -903,6 +902,10 @@ impl Frontend {
903902
.retry(self.collections_with_segments_provider.get_retry_backoff())
904903
.when(|e| e.code() == ErrorCodes::NotFound)
905904
.notify(|_, _| {
905+
tracing::info!(
906+
"Retrying count() request for collection {}",
907+
request.collection_id
908+
);
906909
retries.fetch_add(1, Ordering::Relaxed);
907910
})
908911
.await;
@@ -926,7 +929,6 @@ impl Frontend {
926929
..
927930
}: GetRequest,
928931
) -> Result<GetResponse, QueryError> {
929-
tracing::info!("Retrying get() request for collection {}", collection_id);
930932
let collection_and_segments = self
931933
.collections_with_segments_provider
932934
.get_collection_with_segments(collection_id)
@@ -1006,6 +1008,10 @@ impl Frontend {
10061008
.retry(self.collections_with_segments_provider.get_retry_backoff())
10071009
.when(|e| e.code() == ErrorCodes::NotFound)
10081010
.notify(|_, _| {
1011+
tracing::info!(
1012+
"Retrying get() request for collection {}",
1013+
request.collection_id
1014+
);
10091015
retries.fetch_add(1, Ordering::Relaxed);
10101016
})
10111017
.await;
@@ -1029,7 +1035,6 @@ impl Frontend {
10291035
..
10301036
}: QueryRequest,
10311037
) -> Result<QueryResponse, QueryError> {
1032-
tracing::info!("Retrying query() request for collection {}", collection_id);
10331038
let collection_and_segments = self
10341039
.collections_with_segments_provider
10351040
.get_collection_with_segments(collection_id)
@@ -1121,6 +1126,10 @@ impl Frontend {
11211126
.retry(self.collections_with_segments_provider.get_retry_backoff())
11221127
.when(|e| e.code() == ErrorCodes::NotFound)
11231128
.notify(|_, _| {
1129+
tracing::info!(
1130+
"Retrying query() request for collection {}",
1131+
request.collection_id
1132+
);
11241133
retries.fetch_add(1, Ordering::Relaxed);
11251134
})
11261135
.await;

0 commit comments

Comments
 (0)