Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复ParameterMetric在生产环境导致的内存泄漏(请求对象继承ParamFlowArgument,包含sku等多个无限… #3391

Open
wants to merge 1 commit into
base: 1.8
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@
if (arg == null) {
continue;
}
if (arg instanceof ParamFlowArgument) {
arg = ((ParamFlowArgument) arg).paramFlowKey();

Check warning on line 145 in sentinel-extension/sentinel-parameter-flow-control/src/main/java/com/alibaba/csp/sentinel/slots/block/flow/param/ParameterMetric.java

View check run for this annotation

Codecov / codecov/patch

sentinel-extension/sentinel-parameter-flow-control/src/main/java/com/alibaba/csp/sentinel/slots/block/flow/param/ParameterMetric.java#L145

Added line #L145 was not covered by tests
}

if (Collection.class.isAssignableFrom(arg.getClass())) {

for (Object value : ((Collection)arg)) {
Expand Down Expand Up @@ -201,6 +205,9 @@
if (arg == null) {
continue;
}
if (arg instanceof ParamFlowArgument) {
arg = ((ParamFlowArgument) arg).paramFlowKey();

Check warning on line 209 in sentinel-extension/sentinel-parameter-flow-control/src/main/java/com/alibaba/csp/sentinel/slots/block/flow/param/ParameterMetric.java

View check run for this annotation

Codecov / codecov/patch

sentinel-extension/sentinel-parameter-flow-control/src/main/java/com/alibaba/csp/sentinel/slots/block/flow/param/ParameterMetric.java#L209

Added line #L209 was not covered by tests
}

if (Collection.class.isAssignableFrom(arg.getClass())) {
for (Object value : ((Collection)arg)) {
Expand Down
Loading