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 e260abd commit 79757cb
Showing 1 changed file with 4 additions and 4 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 @@ -227,7 +227,7 @@ func (kgm *KeyspaceGroupManager) Initialize() error {
done := make(chan struct{}, 1)
ctx, cancel := context.WithCancel(kgm.ctx)
go kgm.checkInitProgress(ctx, cancel, done)
watchStartRevision, sawDefaultKeyspaceGroup, err := kgm.initAssignment(ctx)
watchStartRevision, defaultKGConfigured, err := kgm.initAssignment(ctx)
done <- struct{}{}
if err != nil {
log.Error("failed to initialize keyspace group manager", errs.ZapError(err))
Expand All @@ -237,7 +237,7 @@ func (kgm *KeyspaceGroupManager) Initialize() error {
}

// Initialize the default keyspace group if it isn't configured in the storage.
if !sawDefaultKeyspaceGroup {
if !defaultKGConfigured {
keyspaces := []uint32{mcsutils.DefaultKeyspaceID}
kgm.initDefaultKeysapceGroup(keyspaces)
}
Expand Down Expand Up @@ -292,7 +292,7 @@ func (kgm *KeyspaceGroupManager) initDefaultKeysapceGroup(keyspaces []uint32) {
// Return watchStartRevision, the start revision for watching keyspace group membership/distribution change.
func (kgm *KeyspaceGroupManager) initAssignment(
ctx context.Context,
) (watchStartRevision int64, sawDefaultKeyspaceGroup bool, err error) {
) (watchStartRevision int64, defaultKGConfigured bool, err error) {
var (
groups []*endpoint.KeyspaceGroup
more bool
Expand Down Expand Up @@ -323,7 +323,7 @@ func (kgm *KeyspaceGroupManager) initAssignment(
}

if group.ID == mcsutils.DefaultKeyspaceGroupID {
sawDefaultKeyspaceGroup = true
defaultKGConfigured = true
}

kgm.updateKeyspaceGroup(group)
Expand Down

0 comments on commit 79757cb

Please sign in to comment.