You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 00:51:44 UTC
[I] [BUG] — `AiResponseTransformerPlugin`: `new ObjectMapper()` per response (two sites) [shenyu]
Aias00 opened a new issue, #6670:
URL: https://github.com/apache/shenyu/issues/6670
- severity: High
- files: `shenyu-plugin-ai/shenyu-plugin-ai-response-transformer/.../AiResponseTransformerPlugin.java:220` (`new ObjectMapper().readTree(body)` inside `extractJsonBodyFromAiResponse`, per response) and `:337` (`ObjectMapper objectMapper = new ObjectMapper()` inside `writeWith`'s `flatMap`, per response)
- description: `writeWith` runs on every decorated response body when the ai-response-transformer plugin is active; `new ObjectMapper()` builds a fresh TypeFactory/SerializerProvider each call. Sibling `AiTokenLimiterPlugin.java:196` correctly hoists a static `MAPPER`.
- impact: Per-response ObjectMapper construction on every AI-transformed response; CPU + young-gen pressure under load.
- suggested_fix: Hoist `private static final ObjectMapper MAPPER = new ObjectMapper();` (reuse sibling pattern).
- confidence: High
- related_existing: PERF-22 covers `McpServerPlugin.java:710` + `MessageHandlingResult.java:93`; these are different files/classes.
---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] — `AiResponseTransformerPlugin`: `new ObjectMapper()` per response (two sites) [shenyu]
Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6670: [BUG] — `AiResponseTransformerPlugin`: `new ObjectMapper()` per response (two sites)
URL: https://github.com/apache/shenyu/issues/6670
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] — `AiResponseTransformerPlugin`: `new ObjectMapper()` per response (two sites) [shenyu]
Posted by "wy471x (via GitHub)" <gi...@apache.org>.
wy471x commented on issue #6670:
URL: https://github.com/apache/shenyu/issues/6670#issuecomment-5741846865
/assign
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] — `AiResponseTransformerPlugin`: `new ObjectMapper()` per response (two sites) [shenyu]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6670:
URL: https://github.com/apache/shenyu/issues/6670#issuecomment-5161214930
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
- **Title**: [BUG] — `AiResponseTransformerPlugin`: `new ObjectMapper()` per response (two sites)
- **Link**: https://github.com/apache/shenyu/issues/6670
Please review when you have time. Thank you! 🙏
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org