Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow event retries even if initial request fails to connect #93

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team as a code owner July 30, 2024 15:53
@@ -107,8 +107,8 @@ where
}
};

for attempt in 0..2 {
if attempt == 1 {
for attempt in 1..=2 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it makes more sense to be 1-based in this situation, even though I typically prefer 0 based loops.

@@ -134,6 +134,7 @@ where

let response = match result {
Ok(response) => response,
Err(_) if attempt == 1 => continue,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A customer opened an issue because their logs are filled with the message show in the other error branch. While this change doesn't necessarily fix their specific problem, it should help in a couple of ways.

  1. Originally, we were considering the original failure to be unrecoverable, which might not be true. So more events might start making it through.
  2. We won't log anything on the first failure, so if the failure is temporary, we won't unnecessarily alert customers.

@keelerm84 keelerm84 merged commit a9c0150 into main Jul 30, 2024
3 checks passed
@keelerm84 keelerm84 deleted the mk/sc-251636/failed-events branch July 30, 2024 18:53
keelerm84 pushed a commit that referenced this pull request Aug 8, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.2.1](2.2.0...2.2.1)
(2024-08-08)


### Bug Fixes

* Allow event retries even if initial request fails to connect
([#93](#93))
([a9c0150](a9c0150))
* Suppress error log on `es::Error::Eof`
([#96](#96))
([20d0891](20d0891))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants