Skip to content

Commit 4a65db1

Browse files
committed
fix: query execution max times comparison
1 parent 3fa5063 commit 4a65db1

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

aggregation_mode/db/src/orchestrator.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl DbOrchestrator {
121121
Ok(value) => return Ok(value),
122122
Err(RetryError::Permanent(err)) => return Err(err),
123123
Err(RetryError::Transient(err)) => {
124-
if attempts >= self.retry_config.max_delay_seconds {
124+
if attempts >= self.retry_config.max_times {
125125
return Err(err);
126126
}
127127

@@ -164,11 +164,7 @@ impl DbOrchestrator {
164164
};
165165

166166
let scaled = Duration::from_secs_f64(scaled_secs);
167-
if scaled > max {
168-
max
169-
} else {
170-
scaled
171-
}
167+
scaled.max(max)
172168
}
173169

174170
async fn execute_once<T, Q, Fut>(

0 commit comments

Comments
 (0)