From 4b9f0520f61015858771897d559476342cb23407 Mon Sep 17 00:00:00 2001 From: Qiang Zhao Date: Thu, 7 Nov 2024 20:45:42 +0800 Subject: [PATCH] fix typo --- coordinator/impl/coordinator.go | 2 +- coordinator/impl/shard_controller.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coordinator/impl/coordinator.go b/coordinator/impl/coordinator.go index 4835e81e..1885e078 100644 --- a/coordinator/impl/coordinator.go +++ b/coordinator/impl/coordinator.go @@ -477,7 +477,7 @@ func (c *coordinator) handleClusterConfigUpdated() error { } for _, sc := range c.shardControllers { - sc.SyncServerInfo() + sc.SyncServerAddress() } c.ClusterConfig = newClusterConfig diff --git a/coordinator/impl/shard_controller.go b/coordinator/impl/shard_controller.go index 885befd4..5c4a8194 100644 --- a/coordinator/impl/shard_controller.go +++ b/coordinator/impl/shard_controller.go @@ -64,7 +64,7 @@ type ShardController interface { HandleNodeFailure(failedNode model.ServerAddress) - SyncServerInfo() + SyncServerAddress() SwapNode(from model.ServerAddress, to model.ServerAddress) error DeleteShard() @@ -141,7 +141,7 @@ func NewShardController(namespace string, shard int64, namespaceConfig *model.Na s.ctx, s.cancel = context.WithCancel(context.Background()) - s.SyncServerInfo() + s.SyncServerAddress() s.log.Info( "Started shard controller", @@ -890,7 +890,7 @@ func (s *shardController) waitForFollowersToCatchUp(ctx context.Context, leader return nil } -func (s *shardController) SyncServerInfo() { +func (s *shardController) SyncServerAddress() { s.shardMetadataMutex.RLock() exist := false for _, candidate := range s.shardMetadata.Ensemble {