Function lookup with an expected output content type modifies the shared cached function wrapper
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
- 45/100
Hướng nghiên cứu
Start in SimpleFunctionRegistry.doLookup(..) and the wrappedFunctionDefinitions cache it reads from, listing every mutable per-lookup field on the wrapper (expectedOutputContentType, skipInputConversion, skipOutputConversion, the input header enhancer, propagateInputHeaders). Then trace where the invocation applies those settings to see whether they can be passed per call instead of stored. The fix is done when a new test looks up one function concurrently with different expected content types and each result keeps its own, with existing registry tests still green.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
SimpleFunctionRegistry.doLookup(..) assigns the requested output mime types to the wrapper it returns (function.expectedOutputContentType = expectedOutputMimeTypes). That wrapper is usually the instance cached in wrappedFunctionDefinitions and shared by all callers, because functions are singletons by default.
This has two consequences:
- concurrent lookups of the same function definition with different expected content types (for example HTTP requests with different
Acceptheaders) overwrite each other's value on one shared, non-volatile field, so a request may be converted to the content type that another request asked for - the field is only assigned when mime types are given and is never reset, so a later lookup without mime types still uses the content type left by an earlier caller
The wrapper holds other per-lookup state with the same problem: skipInputConversion, skipOutputConversion, the input header enhancer and propagateInputHeaders.
Proposed change: do not modify the cached wrapper. Return a lightweight per-lookup view or copy when a lookup needs different settings (or pass the expected content type with the invocation), and add a test that looks up the same function concurrently with different content types and verifies that each result uses its own.
- Ngôn ngữ chính
- Java
- Star
- 1.1k
- Fork
- 655
- Merge trung bình
- 4 giờ 54 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 spring-cloud/spring-cloud-function
-
ClassCastException with spring-cloud-function 4.3.6 when a field of type Set is deserializedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
spring-cloud/spring-cloud-function#1542 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GcfJarLayout omits GcfJarLauncher$NestedUrlStreamHandlerFactory, causing NoClassDefFoundError under the GCF invokerCó thể đã có người làm @zemiles đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 32/100
spring-cloud/spring-cloud-function#1544 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
spring-cloud/spring-cloud-function#1538 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Kotlin function wrapper treats empty input as no inputCó thể đã có người làm @seonwooj0810 đã nhận hôm nay. Đang mở5.0.x backport bug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 30/100
spring-cloud/spring-cloud-function#1537 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Default JSON mapper collection limit is hard-coded and replaces all collection deserializationĐang mở5.0.x backport bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
spring-cloud/spring-cloud-function#1536 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của spring-cloud/spring-cloud-function
Issue tương tự
-
[FEAT] Lambda: support the nodejs26.x runtimeCó thể đã có người làm @lBroth đã 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
floci-io/floci#9392 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/camel-website#1872 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
area/backend component/c8-api kind/task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug devops low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày