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

Enhance to remove double filter service info for push callback. #8574

Merged

Conversation

KomachiSion
Copy link
Collaborator

@KomachiSion KomachiSion commented Jun 14, 2022

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

Naming push call back will filter hosts of service info. but the PushExecutor has do this operation once. So once push will do twice filter, which will cost double time and cpu.

What's more, after push success or failed, the service matadata may be changed, so the filter in callback may be different with the actual push serviceInfo.

Brief changelog

  • Abstract NamingPushCallback
  • set actualServiceInfo to NamingPushCallback in PushExecutor

Verifying this change

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed 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.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. 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.
  • 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 integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

@KomachiSion KomachiSion added kind/enhancement Category issues or prs related to enhancement. area/Naming labels Jun 14, 2022
@KomachiSion KomachiSion added this to the 2.1.1 milestone Jun 14, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #8574 (35adc2a) into develop (10e0490) will increase coverage by 0.03%.
The diff coverage is 55.76%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #8574      +/-   ##
=============================================
+ Coverage      41.24%   41.28%   +0.03%     
- Complexity      4396     4430      +34     
=============================================
  Files            876      882       +6     
  Lines          31868    32106     +238     
  Branches        3708     3718      +10     
=============================================
+ Hits           13144    13255     +111     
- Misses         17407    17525     +118     
- Partials        1317     1326       +9     
Impacted Files Coverage Δ
...a/nacos/common/trace/DeregisterInstanceReason.java 0.00% <0.00%> (ø)
...ba/nacos/common/trace/HealthStateChangeReason.java 0.00% <0.00%> (ø)
...aba/nacos/common/trace/event/NamingTraceEvent.java 0.00% <0.00%> (ø)
...m/alibaba/nacos/common/trace/event/TraceEvent.java 0.00% <0.00%> (ø)
...ent/manager/impl/EphemeralIpPortClientManager.java 54.00% <0.00%> (ø)
.../nacos/naming/healthcheck/ClientBeatProcessor.java 0.00% <0.00%> (ø)
...ba/nacos/naming/healthcheck/HealthCheckCommon.java 0.00% <0.00%> (ø)
...g/healthcheck/heartbeat/ClientBeatProcessorV2.java 46.15% <0.00%> (-3.85%) ⬇️
.../healthcheck/v2/processor/HealthCheckCommonV2.java 42.50% <0.00%> (-3.45%) ⬇️
.../naming/push/v2/executor/PushExecutorDelegate.java 84.61% <ø> (ø)
... and 28 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 a7d8066...35adc2a. Read the comment docs.

@KomachiSion KomachiSion merged commit ed81d3c into alibaba:develop Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Naming kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants