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

route call optimize #1244

Merged
merged 5 commits into from
Jun 25, 2021
Merged

route call optimize #1244

merged 5 commits into from
Jun 25, 2021

Conversation

XiaoWeiKIN
Copy link
Contributor

@XiaoWeiKIN XiaoWeiKIN commented Jun 7, 2021

in RegistryDirectory.List

routerChain := dir.RouterChain()

	if routerChain == nil {
		dir.invokersLock.RLock()
		defer dir.invokersLock.RUnlock()
		return dir.cacheInvokers
	}

If I didn't create the route it should just go back cacheInvokers,but NewRegistryDirectory created a default routerChain struct, so the judgment here will never be valid

@XiaoWeiKIN
Copy link
Contributor Author

image

image

image

Copy link
Member

@zouyx zouyx left a comment

Choose a reason for hiding this comment

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

fix conflicts pls

@AlexStocks AlexStocks closed this Jun 17, 2021
@AlexStocks AlexStocks reopened this Jun 17, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2021

Codecov Report

Merging #1244 (f363886) into 1.5 (8415609) will decrease coverage by 0.46%.
The diff coverage is 56.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##              1.5    #1244      +/-   ##
==========================================
- Coverage   58.93%   58.47%   -0.47%     
==========================================
  Files         269      273       +4     
  Lines       13180    13267      +87     
==========================================
- Hits         7768     7758      -10     
- Misses       4437     4551     +114     
+ Partials      975      958      -17     
Impacted Files Coverage Δ
cluster/cluster_impl/mock_cluster.go 0.00% <0.00%> (ø)
common/extension/cluster_interceptor.go 0.00% <0.00%> (ø)
common/proxy/proxy_factory/default.go 13.55% <0.00%> (ø)
config/config_loader.go 38.83% <0.00%> (-0.58%) ⬇️
config/consumer_config.go 53.84% <ø> (ø)
config/metadata_report_config.go 47.05% <ø> (+2.94%) ⬆️
config/provider_config.go 54.54% <ø> (ø)
config/service_config.go 57.51% <0.00%> (ø)
config_center/configurator/mock.go 0.00% <0.00%> (ø)
config_center/configurator/override.go 72.22% <ø> (ø)
... and 105 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 a3569bf...f363886. Read the comment docs.

@AlexStocks
Copy link
Contributor

}
// start to listen notify
go dir.routerChain.Loop()
Copy link
Member

Choose a reason for hiding this comment

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

Why will you delete this code? if you delete this code , router will not effect no longer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

因为baseDirectory在new的时候不需要创建routerChain,因为我没有创建任何路由策略,所不需要loop

Copy link
Contributor

@zhaoyunxing92 zhaoyunxing92 left a comment

Choose a reason for hiding this comment

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

approved these changes

@AlexStocks AlexStocks merged commit bbaab68 into apache:1.5 Jun 25, 2021
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.

6 participants