Skip to content

--override cannot work with retry #275

@BugenZhao

Description

@BugenZhao

According to the source code, the retry logic is implemented outside the apply_record function, which will be called by update_record.

// Retry for `retry.attempts` times. The parser ensures that `retry.attempts` must > 0.
let retry = retry.unwrap();
let mut last_error = None;
for _ in 0..retry.attempts {
let result = self.run_async_no_retry(record.clone()).await;
if result.is_ok() {
return result;
}
tracing::warn!(target:"sqllogictest::retry", backoff = ?retry.backoff, error = ?result, "retrying");
D::sleep(retry.backoff).await;
last_error = result.err();
}
Err(last_error.unwrap())
}
/// Run a single record without retry.
async fn run_async_no_retry(
&mut self,
record: Record<D::ColumnType>,
) -> Result<RecordOutput<D::ColumnType>, TestError> {
let result = self.apply_record(record.clone()).await;

As a result, statements or queries with retry keyword cannot be updated to have the desired output.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions