Skip to content

Commit

Permalink
rebase master
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Shi <binshi.bing@gmail.com>
  • Loading branch information
binshi-bing committed Mar 27, 2023
1 parent 7a6b9c6 commit fa72e9d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/mcs/tso/server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (s *Service) Tso(stream tsopb.TSO_TsoServer) error {
return status.Errorf(codes.FailedPrecondition, "mismatch cluster id, need %d but got %d", s.clusterID, request.GetHeader().GetClusterId())
}
count := request.GetCount()
ts, err := s.keyspaceGroupManager.HandleRequest(utils.DefaultKeySpaceGroupID, request.GetDcLocation(), count)
ts, err := s.keyspaceGroupManager.HandleTSORequest(utils.DefaultKeySpaceGroupID, request.GetDcLocation(), count)
if err != nil {
return status.Errorf(codes.Unknown, err.Error())
}
Expand Down
1 change: 0 additions & 1 deletion pkg/mcs/tso/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ func (s *Server) startServer() (err error) {
s.keyspaceGroupManager.Initialize()

s.tsoProtoFactory = &tsoutil.TSOProtoFactory{}

s.service = &Service{Server: s}

tlsConfig, err := s.cfg.Security.ToTLSConfig()
Expand Down
2 changes: 1 addition & 1 deletion pkg/tso/keyspace_group_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (kgm *KeyspaceGroupManager) GetElectionMember(keyspaceGroupID uint32) Elect

// HandleTSORequest forwards TSO allocation requests to correct TSO Allocators of the given keyspace group.
func (kgm *KeyspaceGroupManager) HandleTSORequest(keyspaceGroupID uint32, dcLocation string, count uint32) (pdpb.Timestamp, error) {
return kgm.ksgAllocatorManagers[keyspaceGroupID].HandleTSORequest(dcLocation, count)
return kgm.ksgAllocatorManagers[keyspaceGroupID].HandleRequest(dcLocation, count)
}

// Close this KeyspaceGroupManager
Expand Down

0 comments on commit fa72e9d

Please sign in to comment.