Skip to content

Commit

Permalink
Fix client check (#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun authored Dec 2, 2022
1 parent 0895542 commit 258724a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 345 deletions.
340 changes: 0 additions & 340 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions plugin/discoverevent/local/event_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ package local

import (
"context"
"github.com/golang/protobuf/ptypes/wrappers"
api "github.com/polarismesh/polaris/common/api/v1"
"sync"
"testing"
"time"

"github.com/golang/protobuf/ptypes/wrappers"
"github.com/stretchr/testify/assert"

api "github.com/polarismesh/polaris/common/api/v1"
"github.com/polarismesh/polaris/common/model"
)

Expand Down
1 change: 1 addition & 0 deletions service/healthcheck/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ func (c *CheckScheduler) checkCallbackClient(value interface{}) {
}
instanceValue.mutex.Lock()
defer instanceValue.mutex.Unlock()

var checkResp *plugin.CheckResponse
var err error
defer func() {
Expand Down
2 changes: 1 addition & 1 deletion service/healthcheck/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (d *Dispatcher) reloadManagedClients() {
log.Infof("[Health Check][Dispatcher]count %d clients has been dispatched to %s, total is %d",
len(nextClients), d.svr.localHost, d.svr.cacheProvider.healthCheckInstances.Count())
originClients := d.managedClients
d.managedClients = originClients
d.managedClients = nextClients
if len(nextClients) > 0 {
for id, client := range nextClients {
if len(originClients) == 0 {
Expand Down
1 change: 1 addition & 0 deletions store/mock/api_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions store/sqldb/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,9 @@ func batchDeleteInstanceMeta(tx *BaseTx, instances []*model.Instance) error {
if entry.FirstRegis {
continue
}

ids = append(ids, entry.ID())

if len(ids) > 1 {
builder.WriteString(",")
}
Expand Down

0 comments on commit 258724a

Please sign in to comment.