Skip to content

Commit

Permalink
add error log (matrixorigin#12966)
Browse files Browse the repository at this point in the history
add some error log

Approved by: @sukki37
  • Loading branch information
zhangxu19830126 authored Nov 25, 2023
1 parent 49b553c commit 67141f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/lockservice/service_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/matrixorigin/matrixone/pkg/common/morpc"
pb "github.com/matrixorigin/matrixone/pkg/pb/lock"
"github.com/matrixorigin/matrixone/pkg/pb/timestamp"
"go.uber.org/zap"
)

func (s *service) initRemote() {
Expand Down Expand Up @@ -240,6 +241,15 @@ func (s *service) getLocalLockTable(
resp.NewBind = &bind
return nil, nil
}

if _, ok := l.(*remoteLockTable); ok {
getLogger().Error("get local lock table, but found remote lock table, something wrong",
zap.String("request", req.DebugString()),
zap.String("serviceID", s.serviceID),
zap.String("request-lock-table", req.LockTable.DebugString()),
zap.String("current-bind", bind.DebugString()))
}

return l, nil
}

Expand Down

0 comments on commit 67141f0

Please sign in to comment.