You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the BusinessParamUtil.BusinessParam class, the hasMultiLevelKey() method always returns true when the key contains a dot (.), triggering hierarchical JSON parsing logic. When your RPC parameter name is literally user.id (not a nested structure), the code incorrectly splits the key into user and id, then tries to get JSON from dataGetter.get("user") and look up the id field - resulting in no value being found.
Solution
I've added a flat boolean field (default false for backward compatibility) to BusinessParam:
flat = false (default): Original behavior, . in key is treated as hierarchical separator
flat = true: Key is used as-is, no hierarchical parsing
The issue reports that b-params with keys containing a dot (.) like user.id are incorrectly parsed as hierarchical JSON paths instead of literal keys.
Root Cause: As identified by @xcaspar, the hasMultiLevelKey() method in BusinessParamUtil.BusinessParam always returns true when the key contains a dot, triggering hierarchical parsing. When the actual parameter name is literally user.id (not a nested structure), the code incorrectly splits it.
Affected Component:chaosblade-exec-jvm - Business parameter parsing for RPC fault injection.
Fix Direction: Add a configuration flag or escape mechanism (e.g., \. or "user.id") to let users indicate that the dot is literal, not hierarchical. Alternatively, try flat lookup first, then fall back to hierarchical parsing.
Status: Root cause identified. A PR has been requested from the community.
Automated evaluation by oss-taishan-ai - ChaosBlade Community Bot
Activity
xcaspar commentedon Dec 30, 2025
很好的建议,能否提供一个 PR?
xcaspar commentedon Mar 9, 2026
Thanks for reporting this issue!
Root Cause
In the
BusinessParamUtil.BusinessParamclass, thehasMultiLevelKey()method always returnstruewhen the key contains a dot (.), triggering hierarchical JSON parsing logic. When your RPC parameter name is literallyuser.id(not a nested structure), the code incorrectly splits the key intouserandid, then tries to get JSON fromdataGetter.get("user")and look up theidfield - resulting in no value being found.Solution
I've added a
flatboolean field (defaultfalsefor backward compatibility) toBusinessParam:flat = false(default): Original behavior,.in key is treated as hierarchical separatorflat = true: Key is used as-is, no hierarchical parsingUsage Example
{ "pattern": "or", "params": [ { "key": "user.id", "value": "123", "mode": "rpc", "flat": true } ] }With
"flat": true,user.idwill be queried as a complete parameter name without being split.PR
Fix submitted in chaosblade-exec-jvm: chaosblade-io/chaosblade-exec-jvm#366
The fix includes:
BusinessParamUtil.javato addflatfield and logicPlease review and let me know if you have any questions!
oss-sentinel-ai commentedon Jun 4, 2026
Issue Evaluation
Category:
type/bug| Status: Confirmed | Severity: LowThe issue reports that
b-paramswith keys containing a dot (.) likeuser.idare incorrectly parsed as hierarchical JSON paths instead of literal keys.Root Cause: As identified by @xcaspar, the
hasMultiLevelKey()method inBusinessParamUtil.BusinessParamalways returnstruewhen the key contains a dot, triggering hierarchical parsing. When the actual parameter name is literallyuser.id(not a nested structure), the code incorrectly splits it.Affected Component:
chaosblade-exec-jvm- Business parameter parsing for RPC fault injection.Fix Direction: Add a configuration flag or escape mechanism (e.g.,
\.or"user.id") to let users indicate that the dot is literal, not hierarchical. Alternatively, try flat lookup first, then fall back to hierarchical parsing.Status: Root cause identified. A PR has been requested from the community.
Automated evaluation by oss-taishan-ai - ChaosBlade Community Bot