Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
fix: touch time not updated when register node (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuLiangWang authored May 6, 2023
1 parent 541b7bf commit 7f1354e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions server/cluster/metadata/cluster_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,13 @@ func (c *ClusterMetadata) RegisterNode(ctx context.Context, registeredNode Regis
}
}

if !c.enableUpdateWhenStable && c.topologyManager.GetClusterState() == storage.ClusterStateStable {
return nil
}

// Update shard node mapping.
// Check whether to update persistence data.
oldCache, exists := c.registeredNodesCache[registeredNode.Node.Name]
c.registeredNodesCache[registeredNode.Node.Name] = registeredNode
if !c.enableUpdateWhenStable && c.topologyManager.GetClusterState() == storage.ClusterStateStable {
return nil
}
if exists && !needUpdate(oldCache, registeredNode) {
return nil
}
Expand Down

0 comments on commit 7f1354e

Please sign in to comment.