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

RequestEvent optimization #12655

Merged
merged 12 commits into from
Jul 30, 2023

Conversation

CLFutureX
Copy link
Contributor

What is the purpose of the change

issue

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.

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2023

Codecov Report

Merging #12655 (e9ee030) into 3.2 (49886b7) will increase coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #12655      +/-   ##
============================================
+ Coverage     69.36%   69.39%   +0.03%     
  Complexity        2        2              
============================================
  Files          1647     1646       -1     
  Lines         68198    68198              
  Branches       9966     9967       +1     
============================================
+ Hits          47304    47327      +23     
+ Misses        16325    16307      -18     
+ Partials       4569     4564       -5     

see 34 files with indirect coverage changes

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

Copy link
Member

@songxiaosheng songxiaosheng left a comment

Choose a reason for hiding this comment

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

LGTM

@AlbumenJ
Copy link
Member

Please resolve conflicts

# Conflicts:
#	dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/filter/support/MetricsClusterFilter.java
#	dubbo-metrics/dubbo-metrics-default/src/main/java/org/apache/dubbo/metrics/event/DefaultSubDispatcher.java
#	dubbo-metrics/dubbo-metrics-default/src/main/java/org/apache/dubbo/metrics/event/RequestBeforeEvent.java
#	dubbo-metrics/dubbo-metrics-default/src/main/java/org/apache/dubbo/metrics/event/RequestEvent.java
#	dubbo-metrics/dubbo-metrics-default/src/test/java/org/apache/dubbo/metrics/collector/AggregateMetricsCollectorTest.java
#	dubbo-metrics/dubbo-metrics-default/src/test/java/org/apache/dubbo/metrics/collector/DefaultCollectorTest.java
@CLFutureX
Copy link
Contributor Author

Please resolve conflicts

Well, it's resolved

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

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

It would be better to rename requestBeforeEvent to requestErrorEvent

@CLFutureX
Copy link
Contributor Author

It would be better to rename requestBeforeEvent to requestErrorEvent

I don't think so because this is applied to MetricsClusterFilter to monitor exceptions that occur before executing requests

@CLFutureX CLFutureX requested a review from AlbumenJ July 18, 2023 10:04
@CLFutureX
Copy link
Contributor Author

CLFutureX commented Jul 19, 2023

It would be better to rename requestBeforeEvent to requestErrorEvent

It would be better to rename requestBeforeEvent to requestErrorEvent

The focus of this event is that the request was aborted before execution,
so I think requestBeforeEvent is more appropriate. Do you think so

@CLFutureX CLFutureX closed this Jul 19, 2023
@CLFutureX CLFutureX reopened this Jul 19, 2023
@AlbumenJ
Copy link
Member

It would be better to rename requestBeforeEvent to requestErrorEvent

It would be better to rename requestBeforeEvent to requestErrorEvent

The focus of this event is that the request was aborted before execution, so I think requestBeforeEvent is more appropriate. Do you think so

However there are only one event in the case

@sonarqubecloud
Copy link

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

85.7% 85.7% Coverage
0.0% 0.0% Duplication

@CLFutureX
Copy link
Contributor Author

It would be better to rename requestBeforeEvent to requestErrorEvent

It would be better to rename requestBeforeEvent to requestErrorEvent

The focus of this event is that the request was aborted before execution, so I think requestBeforeEvent is more appropriate. Do you think so

However there are only one event in the case

Oh, sure! I've made the update

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

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

@songxiaosheng songxiaosheng merged commit e93c5cf into apache:3.2 Jul 30, 2023
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