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

Rft: Filter #1299

Merged
merged 11 commits into from
Jul 8, 2021
Merged

Rft: Filter #1299

merged 11 commits into from
Jul 8, 2021

Conversation

justxuewei
Copy link
Member

@justxuewei justxuewei commented Jul 4, 2021

What this PR does:

  • refactor filter: split filter_impl to subpackage

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  • In order to be compatible with older dubbo-go, filter_impl is reserved and ensures users use the filters without modifying the code.

Does this PR introduce a user-facing change?:

NONE

@justxuewei justxuewei marked this pull request as draft July 4, 2021 08:11
fix config name

fix name problems

update for code style

temp

sync

sync

refactor filter done
@justxuewei justxuewei changed the title [WIP]Rft: Filter Rft: Filter Jul 5, 2021
@justxuewei justxuewei marked this pull request as ready for review July 5, 2021 13:48
@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2021

Codecov Report

Merging #1299 (6f8939f) into 3.0 (968650f) will decrease coverage by 3.75%.
The diff coverage is 55.80%.

Impacted file tree graph

@@            Coverage Diff             @@
##              3.0    #1299      +/-   ##
==========================================
- Coverage   59.53%   55.77%   -3.76%     
==========================================
  Files         259      273      +14     
  Lines       12737    12796      +59     
==========================================
- Hits         7583     7137     -446     
- Misses       4199     4741     +542     
+ Partials      955      918      -37     
Impacted Files Coverage Δ
cluster/cluster_impl/available_cluster_invoker.go 66.66% <ø> (ø)
cluster/cluster_impl/broadcast_cluster_invoker.go 76.47% <ø> (ø)
cluster/cluster_impl/failfast_cluster_invoker.go 66.66% <ø> (ø)
cluster/cluster_impl/mock_cluster.go 0.00% <0.00%> (ø)
cluster/loadbalance/random.go 100.00% <ø> (ø)
common/extension/auth.go 0.00% <0.00%> (ø)
common/extension/cluster.go 0.00% <ø> (ø)
common/extension/cluster_interceptor.go 0.00% <0.00%> (ø)
common/extension/config_center.go 0.00% <ø> (ø)
common/extension/config_center_factory.go 0.00% <ø> (ø)
... and 311 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 21e9f4e...6f8939f. Read the comment docs.

@LaurenceLiZhixin LaurenceLiZhixin added this to the v3.0.0 milestone Jul 6, 2021
@LaurenceLiZhixin
Copy link
Contributor

LaurenceLiZhixin commented Jul 6, 2021

可以再仔细看下接口的命名,这次改了之后尽量杜绝接口名的改动。

filter/tracing/filter.go Outdated Show resolved Hide resolved
filter/tps/strategy/sliding_window.go Outdated Show resolved Hide resolved
filter/execlmt/filter.go Outdated Show resolved Hide resolved
filter/auth/provider_auth_filter.go Show resolved Hide resolved
@justxuewei
Copy link
Member Author

可以再仔细看下接口的命名,这次改了之后尽量杜绝接口名的改动。

目前接口名基本上可以做到不需要再改了,同时加入了filter_impl包用于与旧版代码兼容,如果以后能在dubbogo/imports项目中或者代码中给出import实例,后续可以把filter_impl删除。

@@ -62,12 +62,12 @@ func TestProtocolFilterWrapperRefer(t *testing.T) {

// the same as echo filter, for test
func init() {
extension.SetFilter("echo", GetFilter)
extension.SetFilter("echo", newFilter)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this not affected the real EchoFilter? (If this SetFilter is performed after real EchoFilter 's SetFilter) @LaurenceLiZhixin

@justxuewei justxuewei changed the title Rft: Filter [WIP]Rft: Filter Jul 8, 2021
@justxuewei justxuewei changed the title [WIP]Rft: Filter Rft: Filter Jul 8, 2021
@LaurenceLiZhixin LaurenceLiZhixin merged commit af29042 into apache:3.0 Jul 8, 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