Commit bbcb7d0
committed
mmaprototype: pass []roachpb.StoreID for computeMeansForStoreSet
Previously, computeMeansForStoreSet took in a meansForStoreSet struct. Future
PRs will use this helper function to compute mean load summaries for stores
without having a storeIDPostingList handy. To avoid unnecessary construction of
a storeIDPostingList, the function signature now takes meansLoad and
[]roachpb.StoreID directly. This change lets future callers pass a simple slice
of stores. Since future callers may provide slices with duplicate store IDs, the
function now also de-duplicates them internally.1 parent 2a1771e commit bbcb7d0
File tree
2 files changed
+24
-9
lines changed- pkg/kv/kvserver/allocator/mmaprototype
2 files changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | | - | |
| 479 | + | |
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
232 | 237 | | |
233 | 238 | | |
234 | | - | |
235 | | - | |
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| |||
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
342 | | - | |
| 345 | + | |
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
| |||
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
365 | 371 | | |
366 | 372 | | |
367 | 373 | | |
368 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
369 | 378 | | |
370 | | - | |
371 | | - | |
| 379 | + | |
372 | 380 | | |
373 | 381 | | |
374 | 382 | | |
375 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
376 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
377 | 392 | | |
378 | 393 | | |
379 | 394 | | |
| |||
0 commit comments