Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Shi <[email protected]>
  • Loading branch information
binshi-bing committed Apr 12, 2023
1 parent 6f30ebf commit 612a93f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkg/tso/keyspace_group_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ type state struct {
keyspaceLookupTable map[uint32]uint32
}

func (s *state) Initialize() {
func (s *state) initialize() {
s.keyspaceLookupTable = make(map[uint32]uint32)
}

func (s *state) Deinitialize() {
func (s *state) deinitialize() {
log.Info("closing all keyspace groups")

s.Lock()
Expand Down Expand Up @@ -214,7 +214,7 @@ func NewKeyspaceGroupManager(
kv.NewEtcdKVBase(kgm.etcdClient, kgm.legacySvcRootPath), nil)
kgm.tsoSvcStorage = endpoint.NewStorageEndpoint(
kv.NewEtcdKVBase(kgm.etcdClient, kgm.tsoSvcRootPath), nil)
kgm.state.Initialize()
kgm.state.initialize()
return kgm
}

Expand Down Expand Up @@ -262,7 +262,7 @@ func (kgm *KeyspaceGroupManager) Close() {
// added/initialized after that.
kgm.cancel()
kgm.wg.Wait()
kgm.state.Deinitialize()
kgm.state.deinitialize()

log.Info("keyspace group manager closed")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/tso/keyspace_group_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ func (suite *keyspaceGroupManagerTestSuite) TestGetAMWithMembershipCheck() {
defer mgr.Close()

var (
am *AllocatorManager
am *AllocatorManager
kgid uint32
err error
err error
)

// Create keyspace group 0 which contains keyspace 0, 1, 2.
Expand Down

0 comments on commit 612a93f

Please sign in to comment.