Skip to content

Fix not find server provider startup time#9712

Closed
xiaochangbai wants to merge 2 commits intoapache:3.0from
xiaochangbai:fix-consumer-not-find-provider-start_time
Closed

Fix not find server provider startup time#9712
xiaochangbai wants to merge 2 commits intoapache:3.0from
xiaochangbai:fix-consumer-not-find-provider-start_time

Conversation

@xiaochangbai
Copy link
Contributor

What is the purpose of the change

Fix the problem that the server provider startup time cannot be found on the consumer side

close #9675

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 Report

Merging #9712 (1432857) into 3.0 (c44200b) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.0    #9712      +/-   ##
============================================
+ Coverage     65.67%   65.69%   +0.02%     
  Complexity      296      296              
============================================
  Files          1193     1193              
  Lines         52384    52388       +4     
  Branches       7956     7956              
============================================
+ Hits          34404    34418      +14     
+ Misses        14260    14254       -6     
+ Partials       3720     3716       -4     
Impacted Files Coverage Δ
...ubbo/registry/client/AbstractServiceDiscovery.java 85.36% <100.00%> (+0.49%) ⬆️
...bo/rpc/protocol/dubbo/DecodeableRpcInvocation.java 67.85% <0.00%> (-6.25%) ⬇️
...pache/dubbo/registry/support/AbstractRegistry.java 75.35% <0.00%> (-1.06%) ⬇️
.../dubbo/registry/integration/RegistryDirectory.java 49.24% <0.00%> (+0.75%) ⬆️
...ting/zookeeper/curator/CuratorZookeeperClient.java 71.15% <0.00%> (+0.96%) ⬆️
...dubbo/rpc/cluster/directory/AbstractDirectory.java 82.23% <0.00%> (+1.97%) ⬆️
.../apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java 75.51% <0.00%> (+3.06%) ⬆️
.../apache/dubbo/rpc/filter/ProfilerServerFilter.java 85.71% <0.00%> (+22.85%) ⬆️
...pache/dubbo/common/function/ThrowableFunction.java 100.00% <0.00%> (+28.57%) ⬆️

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 c44200b...1432857. Read the comment docs.

Copy link
Member

@BurningCN BurningCN left a comment

Choose a reason for hiding this comment

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

In fact, there is no need to do this. The provider has a timestamp parameter when registering, but when the registration goes to the MetadataInfo#addService method, the internal logic causes the parameter to be removed due to KEYS_TO_REMOVE. So the solution is to remove timestamp from KEYS_TO_REMOVE.

In addition, this modification is only for the application level, and the interface level also needs to be adjusted (CacheableFailbackRegistry#toUrlsWithoutEmpty also removes the timestamp of the provider url).

Copy link
Member

@BurningCN BurningCN left a comment

Choose a reason for hiding this comment

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

@xiaochangbai
Copy link
Contributor Author

I see. I didn't notice these two removal operations at that time

@AlbumenJ
Copy link
Member

TIMESTAMP key should not pass in metainfo, which is a cache for services' info for static information. BTW, it would be more proper to pass TIMESTAMP in instance info.

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.0] Can't get timestamp cause loadbalance warm-up invalid

4 participants