Skip to content

Commit 8bfa464

Browse files
committed
mmaprototype: rename from UpdateStoreStatus to UpdateStoresStatuses
1 parent b01ea0d commit 8bfa464

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

pkg/kv/kvserver/allocator/mmaprototype/allocator.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ type Allocator interface {
6060
// associated node in the cluster.
6161
ProcessStoreLoadMsg(ctx context.Context, msg *StoreLoadMsg)
6262

63-
// UpdateStoreStatus updates the health and disposition for the stores in storeStatuses according to the statuses in storeStatuses.
64-
// Stores not known to the allocator are ignored with logging.
65-
// TODO(wenyihu6): if this is too expensive, we should only update status for stores that have changed.
66-
UpdateStoreStatus(ctx context.Context, storeStatuses map[roachpb.StoreID]Status)
63+
// UpdateStoresStatuses updates the health and disposition for the stores in
64+
// storeStatuses. Stores unknown to the allocator are ignored with logging.
65+
// to the allocator are ignored with logging.
66+
UpdateStoresStatuses(ctx context.Context, storeStatuses map[roachpb.StoreID]Status)
6767

6868
// Methods related to making changes.
6969

pkg/kv/kvserver/allocator/mmaprototype/allocator_state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ func (a *allocatorState) ProcessStoreLoadMsg(ctx context.Context, msg *StoreLoad
204204
a.cs.processStoreLoadMsg(ctx, msg)
205205
}
206206

207-
// UpdateStoreStatus implements the Allocator interface.
208-
func (a *allocatorState) UpdateStoreStatus(
207+
// UpdateStoresStatus implements the Allocator interface.
208+
func (a *allocatorState) UpdateStoresStatuses(
209209
ctx context.Context, storeStatuses map[roachpb.StoreID]Status,
210210
) {
211211
a.mu.Lock()

pkg/kv/kvserver/asim/mmaintegration/mma_store_rebalancer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func (msr *MMAStoreRebalancer) Tick(ctx context.Context, tick time.Time, s state
156156
// This uses the real production RefreshStoreStatus, which queries
157157
// StorePool (backed by StatusTracker via NodeLivenessFn) and
158158
// translates to MMA's status model.
159-
msr.allocator.UpdateStoreStatus(ctx, msr.as.GetMMAStoreStatuses())
159+
msr.allocator.UpdateStoresStatuses(ctx, msr.as.GetMMAStoreStatuses())
160160
storeLeaseholderMsg := MakeStoreLeaseholderMsgFromState(s, msr.localStoreID)
161161
pendingChanges := msr.allocator.ComputeChanges(ctx, &storeLeaseholderMsg, mmaprototype.ChangeOptions{
162162
LocalStoreID: roachpb.StoreID(msr.localStoreID),

pkg/kv/kvserver/mma_store_rebalancer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (m *mmaStoreRebalancer) start(ctx context.Context, stopper *stop.Stopper) {
125125
// rebalance may return true if errors happen in the process and fail to apply
126126
// the changes successfully.
127127
func (m *mmaStoreRebalancer) rebalance(ctx context.Context, periodicCall bool) bool {
128-
m.mma.UpdateStoreStatus(ctx, m.as.GetMMAStoreStatuses())
128+
m.mma.UpdateStoresStatuses(ctx, m.as.GetMMAStoreStatuses())
129129
knownStoresByMMA := m.mma.KnownStores()
130130
storeLeaseholderMsg, numIgnoredRanges := m.store.MakeStoreLeaseholderMsg(ctx, knownStoresByMMA)
131131
if numIgnoredRanges > 0 {

0 commit comments

Comments
 (0)