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(jsonrpc): Limit header size to avoid unexpected OOM #2466

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

justxuewei
Copy link
Member

This patch limits the max size of header to 8Mib to avoid OOM issues.

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2023

Codecov Report

Merging #2466 (60c1dcd) into main (8b43135) will increase coverage by 0.90%.
Report is 24 commits behind head on main.
The diff coverage is 47.18%.

❗ Current head 60c1dcd differs from pull request most recent head 5b59f4c. Consider uploading reports for the commit 5b59f4c to get more accurate results

@@            Coverage Diff             @@
##             main    #2466      +/-   ##
==========================================
+ Coverage   44.27%   45.17%   +0.90%     
==========================================
  Files         304      269      -35     
  Lines       18528    18190     -338     
==========================================
+ Hits         8203     8218      +15     
+ Misses       9467     9095     -372     
- Partials      858      877      +19     
Files Coverage Δ
common/host_util.go 85.18% <ø> (+14.81%) ⬆️
filter/metrics/filter.go 100.00% <100.00%> (ø)
filter/otel/trace/attachment.go 100.00% <ø> (ø)
filter/otel/trace/filter.go 71.01% <100.00%> (ø)
metrics/prometheus/rt_vec.go 100.00% <100.00%> (ø)
metrics/reporter.go 0.00% <ø> (ø)
metrics/util/aggregate/aggregator.go 100.00% <100.00%> (ø)
protocol/jsonrpc/server.go 14.76% <0.00%> (ø)
common/url.go 61.73% <0.00%> (-0.27%) ⬇️
registry/zookeeper/service_discovery.go 17.15% <60.00%> (+0.29%) ⬆️
... and 12 more

... and 35 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

This patch limits the max size of header to 8Mib to avoid OOM issues.

Signed-off-by: Xuewei Niu <justxuewei@apache.org>
@sonarcloud
Copy link

sonarcloud bot commented Oct 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chickenlj chickenlj merged commit bbe0bff into apache:main Oct 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants