Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
929bbde3
Commit
929bbde3
authored
4 years ago
by
beiwei.ly
Browse files
Options
Downloads
Patches
Plain Diff
fix review comment
parent
d1d5eda3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
registry/directory/directory.go
+2
-2
2 additions, 2 deletions
registry/directory/directory.go
registry/protocol/protocol.go
+1
-1
1 addition, 1 deletion
registry/protocol/protocol.go
with
3 additions
and
3 deletions
registry/directory/directory.go
+
2
−
2
View file @
929bbde3
...
...
@@ -128,7 +128,7 @@ func (dir *RegistryDirectory) refreshInvokers(events ...*registry.ServiceEvent)
var
oldInvokers
[]
protocol
.
Invoker
// in batch mode, it is safe to remove since we have the complete list of events.
if
events
!=
nil
&&
len
(
events
)
>
1
{
if
len
(
events
)
>
1
{
dir
.
cacheInvokersMap
.
Range
(
func
(
k
,
v
interface
{})
bool
{
if
!
dir
.
eventMatched
(
k
.
(
string
),
events
)
{
if
invoker
:=
dir
.
uncacheInvokerWithKey
(
k
.
(
string
));
invoker
!=
nil
{
...
...
@@ -145,7 +145,7 @@ func (dir *RegistryDirectory) refreshInvokers(events ...*registry.ServiceEvent)
}
}
if
events
!=
nil
&&
len
(
events
)
>
0
{
if
len
(
events
)
>
0
{
dir
.
setNewInvokers
()
}
...
...
This diff is collapsed.
Click to expand it.
registry/protocol/protocol.go
+
1
−
1
View file @
929bbde3
...
...
@@ -243,7 +243,7 @@ func newOverrideSubscribeListener(overriderUrl *common.URL, invoker protocol.Inv
// Notify will be triggered when a service change notification is received.
func
(
nl
*
overrideSubscribeListener
)
Notify
(
events
...*
registry
.
ServiceEvent
)
{
if
events
==
nil
||
len
(
events
)
==
0
{
if
len
(
events
)
==
0
{
return
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment