Skip to content

Commit 1078343

Browse files
committed
refactor(shard distributor): found a place where I forgot to rename to statistics
Signed-off-by: Andreas Holt <[email protected]>
1 parent 44d4033 commit 1078343

File tree

1 file changed

+5
-5
lines changed
  • service/sharddistributor/store/etcd/executorstore

1 file changed

+5
-5
lines changed

service/sharddistributor/store/etcd/executorstore/etcdstore.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type executorStoreImpl struct {
4141
type shardStatisticsUpdate struct {
4242
key string
4343
shardID string
44-
metrics store.ShardStatistics
44+
stats store.ShardStatistics
4545
desiredLastMove int64 // intended LastMoveTime for this update
4646
}
4747

@@ -261,7 +261,7 @@ func (s *executorStoreImpl) GetState(ctx context.Context, namespace string) (*st
261261
assignedStates[executorID] = assigned
262262
}
263263

264-
// Fetch shard-level metrics stored under shard namespace keys.
264+
// Fetch shard-level statistics stored under shard namespace keys.
265265
shardPrefix := etcdkeys.BuildShardPrefix(s.prefix, namespace)
266266
shardResp, err := s.client.Get(ctx, shardPrefix, clientv3.WithPrefix())
267267
if err != nil {
@@ -450,7 +450,7 @@ func (s *executorStoreImpl) prepareShardStatisticsUpdates(ctx context.Context, n
450450
updates = append(updates, shardStatisticsUpdate{
451451
key: shardStatisticsKey,
452452
shardID: shardID,
453-
metrics: stats,
453+
stats: stats,
454454
desiredLastMove: now,
455455
})
456456
}
@@ -463,9 +463,9 @@ func (s *executorStoreImpl) prepareShardStatisticsUpdates(ctx context.Context, n
463463
// Is intentionally made tolerant of failures since the data is telemetry only.
464464
func (s *executorStoreImpl) applyShardStatisticsUpdates(ctx context.Context, namespace string, updates []shardStatisticsUpdate) {
465465
for _, update := range updates {
466-
update.metrics.LastMoveTime = update.desiredLastMove
466+
update.stats.LastMoveTime = update.desiredLastMove
467467

468-
payload, err := json.Marshal(update.metrics)
468+
payload, err := json.Marshal(update.stats)
469469
if err != nil {
470470
s.logger.Warn(
471471
"failed to marshal shard statistics after assignment",

0 commit comments

Comments
 (0)