[BUG]App Configuration pull refresh runs synchronously on the servlet request thread (Mono.just(refreshStores())); a slow or unavailable store blocks user requests
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java, spring-boot
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
Start by reading AppConfigurationEventListener and AppConfigurationPullRefresh.refreshConfigurations() in the App Configuration config modules; the issue identifies the eager Mono.just(refreshStores()) call and the servlet event that triggers it. Trace the existing refresh tests and how they invoke store calls. Done means refresh checks no longer hold servlet request threads during slow store calls, with coverage showing the request can complete independently.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
With spring-cloud-azure-appconfiguration-config-web on the classpath and monitoring.enabled: true,
AppConfigurationEventListener handles every ServletRequestHandledEvent by calling
appConfigurationRefresh.refreshConfigurations().subscribe().
AppConfigurationPullRefresh.refreshConfigurations() is implemented as:
public Mono<Boolean> refreshConfigurations() {
return Mono.just(refreshStores());
}
Mono.just(...) evaluates its argument eagerly, so refreshStores() (which makes blocking HTTP calls to the
store) runs synchronously on the Tomcat request thread before .subscribe() is reached.
ServletRequestHandledEvent is published inside FrameworkServlet.processRequest before the response is
completed, so the client waits for the refresh too.
When the store is slow or unavailable, whichever user request happens to trigger the refresh check is held for
the full duration of the store call (up to the HTTP client's 60 s response timeout).
This looks like the same issue as #37018 (reported against 5.x). That issue was closed as stale, with a note that
v6 should fix it and to open a new issue if it didn't. It is still present in 7.4.0.
Versions
spring-cloud-azure-appconfiguration-config(-web): observed on 7.0.0, same code in 7.4.0 (latest)- Spring Boot 3.x, servlet stack (Tomcat), Java 21
Observed in production
- Normal: refresh check median ~20 ms, so the cost is invisible.
- Store returned HTTP 503 for ~40 min: each refresh check took 5–15 s (some 60 s). User-facing requests that
triggered the check took 18–32 s instead of milliseconds, even though the controller had already finished. - One case: the controller completed in ~33 ms and the response was sent after ~61 s (refresh timed out after 60 s).
To Reproduce
- Spring Boot servlet app with
spring-cloud-azure-starter-appconfiguration-config, monitoring enabled:spring.cloud.azure.appconfiguration.stores[0]: endpoint: https://<store>.azconfig.io monitoring: enabled: true refresh-interval: 30s triggers: - key: sentinel - Start the app, then make the store unreachable (e.g. drop outbound traffic to the store's IP, or point the hostname at a non-routable address).
- Wait >30 s, then call any endpoint (
GET /anything). - The response takes as long as the store call times out (~60 s), although the handler returned immediately.
Expected behavior
The refresh check must not block request threads. Either make the call actually asynchronous
(Mono.fromCallable(this::refreshStores).subscribeOn(Schedulers.boundedElastic()), or dispatch to an executor),
or run the check from a scheduler rather than from ServletRequestHandledEvent. A short, configurable timeout for
refresh calls would also help.
- Ngôn ngữ chính
- Java
- Star
- 2.6k
- Fork
- 2.2k
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 259
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/azure-sdk-for-java
-
mgmt, in track 1 migration guide, call out that file-based authentication method is not recommendedCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởAzure.Identity
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
Azure/azure-sdk-for-java#48894 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Azure/azure-sdk-for-java#51237 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Azure/azure-sdk-for-java#51221 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] IllegalStateException when cancelling Service Bus session acquisition on a Reactor threadĐang mởClient customer-reported needs-team-attention question Service Attention Service Bus
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Azure/azure-sdk-for-java#51213 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] KeyVaultEnvironmentPostProcessor cannot load configured property-sources in Spring Boot 4 AOT / GraalVM native imageCó thể đã có người làm @moarychan đã nhận 1 ngày trước. Đang mởazure-spring bug Client customer-reported needs-team-attention
Azure/azure-sdk-for-java#51209 · 2 bình luận · 2 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Azure/azure-sdk-for-java
Issue tương tự
-
bug emitter:client:csharp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/typespec#12572 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationCó thể đã có người làm @amalsaidov đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
area/ai area/backend component/zeebe kind/task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày