-
Notifications
You must be signed in to change notification settings - Fork 932
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
Feat/direct notify #995
Closed
Closed
Feat/direct notify #995
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b6022bb
fix ctx linter error
AlexStocks d305b67
Merge remote-tracking branch 'upstream/develop' into develop
LaurenceLiZhixin 5919b11
Merge remote-tracking branch 'upstream/develop' into develop
LaurenceLiZhixin 5d970c6
fix: add provider -> consumer direct notify when shut down
LaurenceLiZhixin 4f84299
fix: add provider -> consumer direct notify when shut down
LaurenceLiZhixin fb72628
fix: test linter
LaurenceLiZhixin 887ef91
fix: add liscense
LaurenceLiZhixin e9f044e
fix: remove should pool
LaurenceLiZhixin 87c1321
Fix:
LaurenceLiZhixin 3dc2f17
Merge remote-tracking branch 'upstream/develop' into develop
LaurenceLiZhixin b912007
Merge branch 'develop' into feat/directNotify
LaurenceLiZhixin dad63a5
fix
LaurenceLiZhixin 11b1a19
Merge branch 'develop' into feat/directNotify
AlexStocks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package common | ||
|
||
import "sync" | ||
|
||
// DirMap is used by dubbo-getty, it can notify delete event to dubbo directory directly by getty session | ||
// look up at: | ||
// remoting/getty/listener.go | ||
// registry/directory/directory.go | ||
var DirMap sync.Map | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use public variable in this module? Although you have comment in this variable,but It can be used in all modules in dubbo-go.Even the module out of dubbo-go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's the best way to achieve the direct notify from remoting.session to directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find another way to link this two pkg. As there may be unexpected loop refer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请允许我使用中文,关于这个问题,我先说一下我的看法。
先看一下现在的结构,我没理解错应该是:
invoker-》client-》getty pool-》session(connection)
现在是直接加在 session 的 close/error 上。
针对这个 PR,我有以下几个疑问:
我的建议是:
调整到 invoekr 或者 client,通过判断窗口期中多少个请求失败,再触发删除 cache,最后记得加上恢复 registry 的代码。
但是如果按照我的建议做的话,是否能基于:ActiveFilter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我仔细想了想,这里的确有问题。
我写这个pr的是以:“这个session一旦被关闭,证明server端就一定关闭了”为前提的。一旦session因为网络抖动出现了err,会直接删除掉dir的cache,这样设计不太合理。
我先表述一下这个pr的初衷:是为了提高客户端对于server端下线的感知速度:不只通过regisgtry感知,而是通过session感知。如果判断窗口期请求,我觉得是不太现实,因为这个时间可能registry都通知过来了。
感觉这个需求可能有点问题。
另一方面,我的另一个pr:#976
有提供invoke前的健康检查机制,感觉这两个pr在功能上是有重复的,我和展图讨论下。