Skip to content

Commit 0995540

Browse files
committed
mmaintegration: rename mmaAllocator to mmaState
This commit cleans up a comment and renames the mmaAllocator interface to mmaState in the mmaintegration package to avoid naming confusion as mmaAllocator repeats the word allocator.
1 parent 6c78995 commit 0995540

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/kv/kvserver/mmaintegration/allocator_sync.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ type storePool interface {
3636
UpdateLocalStoreAfterRebalance(storeID roachpb.StoreID, rangeUsageInfo allocator.RangeUsageInfo, changeType roachpb.ReplicaChangeType)
3737
}
3838

39-
// mmaAllocator is an interface that defines the methods that the allocator sync
39+
// mmaState is an interface that defines the methods that the allocator sync
4040
// needs to call on the mma. Using an interface to simplify testing.
41-
type mmaAllocator interface {
41+
type mmaState interface {
4242
// RegisterExternalChanges is called by the allocator sync to register
4343
// external changes with the mma.
4444
RegisterExternalChanges(changes []mmaprototype.ReplicaChange) []mmaprototype.ChangeID
@@ -54,13 +54,13 @@ type mmaAllocator interface {
5454
// mma is disabled.)
5555

5656
// AllocatorSync is a component that coordinates changes from all components
57-
// (including mma/replicate/lease queue) with mma and store pool. When mma is
58-
// disabled, its sole purpose is to track and apply changes to the store pool
59-
// upon success.
57+
// (including mma-store-rebalancer/replicate/lease queue) with mma and store
58+
// pool. When mma is disabled, its sole purpose is to track and apply changes
59+
// to the store pool upon success.
6060
type AllocatorSync struct {
6161
sp storePool
6262
st *cluster.Settings
63-
mmaAllocator mmaAllocator
63+
mmaAllocator mmaState
6464
mu struct {
6565
syncutil.Mutex
6666
// changeSeqGen is a monotonically increasing sequence number for
@@ -75,7 +75,7 @@ type AllocatorSync struct {
7575
}
7676

7777
func NewAllocatorSync(
78-
sp storePool, mmaAllocator mmaAllocator, st *cluster.Settings,
78+
sp storePool, mmaAllocator mmaState, st *cluster.Settings,
7979
) *AllocatorSync {
8080
as := &AllocatorSync{
8181
sp: sp,

0 commit comments

Comments
 (0)