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

Improve monitor creating, handle errors #7867

Merged
merged 1 commit into from
May 26, 2021

Conversation

kylixs
Copy link
Member

@kylixs kylixs commented May 26, 2021

What is the purpose of the change

Fix the problem that if an exception is thrown when creating a monitor, it is not handled correctly.

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@kylixs kylixs changed the title improve monitor creating, handle errors Improve monitor creating, handle errors May 26, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2021

Codecov Report

Merging #7867 (c04fc43) into master (2dace54) will decrease coverage by 0.30%.
The diff coverage is 70.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7867      +/-   ##
============================================
- Coverage     59.60%   59.29%   -0.31%     
- Complexity      556      557       +1     
============================================
  Files          1088     1088              
  Lines         43854    43847       -7     
  Branches       6400     6400              
============================================
- Hits          26140    26000     -140     
- Misses        14814    14951     +137     
+ Partials       2900     2896       -4     
Impacted Files Coverage Δ
.../dubbo/monitor/support/AbstractMonitorFactory.java 80.00% <70.00%> (+1.62%) ⬆️
...a/org/apache/dubbo/rpc/filter/AccessLogFilter.java 28.35% <0.00%> (-50.75%) ⬇️
...va/org/apache/dubbo/rpc/support/AccessLogData.java 53.16% <0.00%> (-37.98%) ⬇️
...ng/transport/dispatcher/all/AllChannelHandler.java 68.96% <0.00%> (-27.59%) ⬇️
...dubbo/common/status/support/LoadStatusChecker.java 46.15% <0.00%> (-15.39%) ⬇️
...rg/apache/dubbo/remoting/utils/PayloadDropper.java 76.92% <0.00%> (-15.39%) ⬇️
...ng/transport/dispatcher/WrappedChannelHandler.java 43.47% <0.00%> (-15.22%) ⬇️
.../apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java 62.06% <0.00%> (-10.35%) ⬇️
...dubbo/remoting/exchange/support/DefaultFuture.java 78.63% <0.00%> (-8.55%) ⬇️
.../dubbo/remoting/transport/netty4/NettyChannel.java 56.43% <0.00%> (-7.93%) ⬇️
... and 11 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 2dace54...c04fc43. Read the comment docs.

try {
Monitor m = createMonitor(monitorUrl);
MONITORS.put(key, m);
FUTURES.remove(key);
Copy link
Contributor

Choose a reason for hiding this comment

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

FUTURES.remove(key);

the code seem to be unnecessary

Copy link
Member Author

Choose a reason for hiding this comment

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

Clean up future objects

@AlbumenJ AlbumenJ merged commit 49e6701 into apache:master May 26, 2021
@kylixs kylixs deleted the improve-creating-monitor branch October 23, 2021 04:49
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.

4 participants