Skip to content

Fix thread leakage caused by es client connection creation#6187

Merged
wu-sheng merged 5 commits intoapache:masterfrom
YczYanchengzhe:master
Jan 13, 2021
Merged

Fix thread leakage caused by es client connection creation#6187
wu-sheng merged 5 commits intoapache:masterfrom
YczYanchengzhe:master

Conversation

@YczYanchengzhe
Copy link
Copy Markdown
Contributor

@YczYanchengzhe YczYanchengzhe commented Jan 12, 2021

Since the es plugin creates a connection when acquiring the peer, but does not close it, this will cause thread leakage problems

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

@wu-sheng
Copy link
Copy Markdown
Member

2 things

  1. Please fix the code format. Error from the logs.

2021-01-12T11:58:43.9816407Z [INFO] There is 1 error reported by Checkstyle 8.19 with /home/runner/work/skywalking/skywalking/apm-checkstyle/checkStyle.xml ruleset.
2021-01-12T11:58:43.9833897Z [ERROR] src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientConInterceptor.java:[35,31] (naming) ConstantName: Name 'logger' must match pattern '(^[A-Z][A-Z0-9](_[A-Z0-9]+)$)'.

  1. Please update CHANGES.md in the root folder.

@YczYanchengzhe
Copy link
Copy Markdown
Contributor Author

I fixed the problem you mentioned, what should I do next, do I check the ci again~

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 13, 2021

Codecov Report

Merging #6187 (0d97266) into master (d299ce0) will increase coverage by 2.62%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6187      +/-   ##
============================================
+ Coverage     46.28%   48.91%   +2.62%     
- Complexity     2553     3317     +764     
============================================
  Files          1690      919     -771     
  Lines         35718    22778   -12940     
  Branches       4138     2220    -1918     
============================================
- Hits          16532    11141    -5391     
+ Misses        18226    10688    -7538     
+ Partials        960      949      -11     
Impacted Files Coverage Δ Complexity Δ
...g/oap/server/core/cluster/ClusterHealthStatus.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...ng/apm/agent/core/context/trace/LogDataEntity.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...p/server/core/analysis/metrics/MinLongMetrics.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...er/exporter/provider/grpc/GRPCExporterSetting.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...re/logging/core/converters/AgentNameConverter.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...king/oap/server/configuration/api/ConfigTable.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...skywalking/oap/server/receiver/envoy/als/Role.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...op/server/receiver/mesh/MeshGRPCHandlerCompat.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-1.00%)
...r/receiver/envoy/als/k8s/ServiceNameFormatter.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...alking/oap/server/core/cluster/OAPNodeChecker.java 0.00% <0.00%> (-93.75%) 0.00% <0.00%> (ø%)
... and 1227 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d299ce0...b49733b. Read the comment docs.

@wu-sheng wu-sheng modified the milestone: 6151 Jan 13, 2021
@wu-sheng wu-sheng linked an issue Jan 13, 2021 that may be closed by this pull request
4 tasks
@wu-sheng wu-sheng added this to the 8.4.0 milestone Jan 13, 2021
@wu-sheng wu-sheng added agent Language agent related. bug Something isn't working and you are sure it's a bug! plugin Plugin for agent or collector. Be used to extend the capabilities of default implementor. labels Jan 13, 2021
Copy link
Copy Markdown
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

Once plugin test passed, good to merge.

@wu-sheng wu-sheng merged commit 9dcad4a into apache:master Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Language agent related. bug Something isn't working and you are sure it's a bug! plugin Plugin for agent or collector. Be used to extend the capabilities of default implementor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

es plugin thread leak problem

2 participants