@@ -1311,8 +1311,8 @@ type MMARebalanceAdvisor struct {
1311
1311
// NoopMMARebalanceAdvisor is a no-op MMARebalanceAdvisor that always returns
1312
1312
// false for IsInConflictWithMMA. Used when MMA is disabled or mma does not have
1313
1313
// enough information to determine.
1314
- func NoopMMARebalanceAdvisor () MMARebalanceAdvisor {
1315
- return MMARebalanceAdvisor {
1314
+ func NoopMMARebalanceAdvisor () * MMARebalanceAdvisor {
1315
+ return & MMARebalanceAdvisor {
1316
1316
disabled : true ,
1317
1317
}
1318
1318
}
@@ -1324,7 +1324,7 @@ func NoopMMARebalanceAdvisor() MMARebalanceAdvisor {
1324
1324
// existing store. mma should include the existing store in the candidate set.
1325
1325
func (a * allocatorState ) BuildMMARebalanceAdvisor (
1326
1326
existing roachpb.StoreID , cands []roachpb.StoreID ,
1327
- ) MMARebalanceAdvisor {
1327
+ ) * MMARebalanceAdvisor {
1328
1328
// TODO(wenyihu6): for simplicity, we create a new scratchNodes every call.
1329
1329
// We should reuse the scratchNodes instead.
1330
1330
scratchNodes := map [roachpb.NodeID ]* NodeLoad {}
@@ -1334,7 +1334,7 @@ func (a *allocatorState) BuildMMARebalanceAdvisor(
1334
1334
// TODO(wenyihu6): pass in the actual ctx here
1335
1335
existingSLS := a .cs .computeLoadSummary (context .Background (), existing ,
1336
1336
& means .storeLoad , & means .nodeLoad )
1337
- return MMARebalanceAdvisor {
1337
+ return & MMARebalanceAdvisor {
1338
1338
existingStoreSLS : existingSLS ,
1339
1339
means : means ,
1340
1340
}
@@ -1345,7 +1345,7 @@ func (a *allocatorState) BuildMMARebalanceAdvisor(
1345
1345
// for making sure the MMARebalanceAdvisor is for the correct existing store and
1346
1346
// candidate set.
1347
1347
func (a * allocatorState ) IsInConflictWithMMA (
1348
- cand roachpb.StoreID , advisor MMARebalanceAdvisor , cpuOnly bool ,
1348
+ cand roachpb.StoreID , advisor * MMARebalanceAdvisor , cpuOnly bool ,
1349
1349
) bool {
1350
1350
if advisor .disabled {
1351
1351
return false
0 commit comments