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

Modify the affinity log to avoid misunderstandings #2738

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cluster/router/affinity/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (s *ServiceAffinityRoute) Notify(invokers []protocol.Invoker) {

dynamicConfiguration := conf.GetEnvInstance().GetDynamicConfiguration()
if dynamicConfiguration == nil {
logger.Infof("Config center does not start, Condition router will not be enabled")
logger.Infof("Config center does not start, Affinity router will not be enabled")
return
}

Expand Down Expand Up @@ -101,19 +101,19 @@ func (s *ApplicationAffinityRoute) Notify(invokers []protocol.Invoker) {
}
url := invokers[0].GetURL()
if url == nil {
logger.Error("Failed to notify a dynamically condition rule, because url is empty")
logger.Error("Failed to notify a dynamically affinity rule, because url is empty")
return
}

dynamicConfiguration := conf.GetEnvInstance().GetDynamicConfiguration()
if dynamicConfiguration == nil {
logger.Infof("Config center does not start, Condition router will not be enabled")
logger.Infof("Config center does not start, Affinity router will not be enabled")
return
}

providerApplication := url.GetParam("application", "")
if providerApplication == "" || providerApplication == s.currentApplication {
logger.Warn("condition router get providerApplication is empty, will not subscribe to provider app rules.")
logger.Warn("Affinity router get providerApplication is empty, will not subscribe to provider app rules.")
return
}

Expand All @@ -127,7 +127,7 @@ func (s *ApplicationAffinityRoute) Notify(invokers []protocol.Invoker) {
dynamicConfiguration.AddListener(key, s)
value, err := dynamicConfiguration.GetRule(key)
if err != nil {
logger.Errorf("Failed to query condition rule, key=%s, err=%v", key, err)
logger.Errorf("Failed to query affinity rule, key=%s, err=%v", key, err)
return
}

Expand Down
Loading