Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Suggestions for the modification of 'retrievedServiceInstance == null' in RetryableFeignBlockingLoadBalancerClient#execute

オープン
#1,203 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java, spring
領域
api, backend

調査の方向性

RetryableFeignBlockingLoadBalancerClient.java の 191 行目付近から開始し、LoadBalancerUtils.executeWithLoadBalancerLifecycleProcessing を追跡します。serviceInstance == null の処理を FeignBlockingLoadBalancerClient と比較し、その後、リトライを使い果たした場合に直接のホスト解決を回避し、期待されるサービス利用不可の結果が生成されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

waiting-for-triage

Is your feature request related to a problem? Please describe.

The same interface behaves completely differently in my projects. In one case, it throws a FeignException$ServiceUnavailable exception, while in the other, it throws an UnknownHostException (And it took up to 10 seconds).

After debugging, I found that the inconsistent exception behaviors were caused by the varying implementations of the feign.Client class due to the involvement of spring-retry.

Describe the solution you'd like

The RetryableFeignBlockingLoadBalancerClient appears to reference the handling approach of RetryLoadBalancerInterceptor, but it doesn't perform special handling for the case where serviceInstance == null, unlike FeignBlockingLoadBalancerClient.

I feel that for the case where serviceInstance == null, after retry attempts are exhausted, the RetryableFeignBlockingLoadBalancerClient should return a result similar to that of the FeignBlockingLoadBalancerClient.

Describe alternatives you've considered

I referenced the handling of the serviceInstance == null case in FeignBlockingLoadBalancerClient and modified RetryableFeignBlockingLoadBalancerClient accordingly. It now perfectly meets my expectations.

Image

Additional context

In the code at RetryableFeignBlockingLoadBalancerClient.java:191, within the LoadBalancerUtils.executeWithLoadBalancerLifecycleProcessing method, the feign.Client is directly used to execute the request. Due to the reason that serviceInstance == null, the Client attempts to resolve the host (serviceId), this took too long.

Image

Image

主要言語
Java
スター
1.3k
フォーク
835
平均マージ
23時間 57分
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

spring-cloud/spring-cloud-openfeign のほかの issue

spring-cloud/spring-cloud-openfeign の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。