From 2a2c16279dd1f1e00b5d251ac97842cc1275e5c9 Mon Sep 17 00:00:00 2001 From: Benjamin Dornel Date: Tue, 8 Oct 2024 18:54:29 +0800 Subject: [PATCH] enhancement(gcs sink): add retry for 408 http error --- changelog.d/21447-gcs-sink-retry-on-http-error-408.md | 3 +++ src/sinks/gcs_common/config.rs | 1 + 2 files changed, 4 insertions(+) create mode 100644 changelog.d/21447-gcs-sink-retry-on-http-error-408.md diff --git a/changelog.d/21447-gcs-sink-retry-on-http-error-408.md b/changelog.d/21447-gcs-sink-retry-on-http-error-408.md new file mode 100644 index 0000000000000..25874afebf8cc --- /dev/null +++ b/changelog.d/21447-gcs-sink-retry-on-http-error-408.md @@ -0,0 +1,3 @@ +Adds retry support for the 408 HTTP error (request timed out) for the GCS sink. + +authors: benjamin-awd diff --git a/src/sinks/gcs_common/config.rs b/src/sinks/gcs_common/config.rs index 2fc34e85effba..830083d9e55c4 100644 --- a/src/sinks/gcs_common/config.rs +++ b/src/sinks/gcs_common/config.rs @@ -155,6 +155,7 @@ impl RetryLogic for GcsRetryLogic { match status { StatusCode::UNAUTHORIZED => RetryAction::Retry("unauthorized".into()), + StatusCode::REQUEST_TIMEOUT => RetryAction::Retry("request timeout".into()), StatusCode::TOO_MANY_REQUESTS => RetryAction::Retry("too many requests".into()), StatusCode::NOT_IMPLEMENTED => { RetryAction::DontRetry("endpoint not implemented".into())