Fix: replace hardcoded single retry with exponential backoff retry#26
Open
HashidaTKS wants to merge 1 commit into
Open
Fix: replace hardcoded single retry with exponential backoff retry#26HashidaTKS wants to merge 1 commit into
HashidaTKS wants to merge 1 commit into
Conversation
…koff retry The previous retry logic used a hardcoded Thread.Sleep(100) with one retry, which was arbitrary and provided no logging. Replace with a RetryOnIoException helper that retries up to RetryCount times, applies an incrementally increasing wait (200ms * attempt), catches only IOException, and logs each failed attempt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題点
XmlSerializerWrapper.Serialize()内のリトライロジックが以下の問題を持っていた:Thread.Sleep(100)という根拠のない固定待機時間catch {}で全例外をキャッチ改善内容
RetryOnIoExceptionヘルパーメソッドを導入RetryCount = 3、RetryIntervalMs = 200で設定を一元管理attempt * RetryIntervalMsでインクリメンタルな待機時間を設定(線形バックオフ)catch (IOException ex) when (attempt < RetryCount)でIOExceptionのみを対象にリトライLoggerWrapper.Warn(ex)でログを記録Test plan
IOExceptionが発生した際に最大3回リトライされることを確認🤖 Generated with Claude Code