Skip to content

Commit

Permalink
address the comment
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Feb 2, 2023
1 parent 974bccd commit fd56a3d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/mock/mockcluster/mockcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (mc *Cluster) SetStoreDown(storeID uint64) {
store := mc.GetStore(storeID)
newStore := store.Clone(
core.UpStore(),
core.SetLastHeartbeatTS(time.Time{}),
core.SetLastHeartbeatTS(typeutil.ZeroTime),
)
mc.PutStore(newStore)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/endpoint/key_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const (
regionPathPrefix = "raft/r"
// resource group storage endpoint has prefix `resource_group`
resourceGroupSettingsPath = "settings"

// tso storage endpoint has prefix `tso`
microserviceKey = "microservice"
tsoServiceKey = "tso"
timestampKey = "timestamp"
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/endpoint/tso.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ func (se *StorageEndpoint) LoadTimestamp(keyspaceGroupName string, dcLocationKey
prefixEnd := clientv3.GetPrefixRangeEnd(prefix)
keys, values, err := se.LoadRange(prefix, prefixEnd, 0)
if err != nil {
return time.Time{}, err
return typeutil.ZeroTime, err
}
if len(keys) == 0 {
return time.Time{}, nil
return typeutil.ZeroTime, nil
}

maxTSWindow := typeutil.ZeroTime
Expand Down
2 changes: 1 addition & 1 deletion server/cluster/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (c *testCluster) setStoreDown(storeID uint64) error {
store := c.GetStore(storeID)
newStore := store.Clone(
core.UpStore(),
core.SetLastHeartbeatTS(time.Time{}),
core.SetLastHeartbeatTS(typeutil.ZeroTime),
)
c.Lock()
defer c.Unlock()
Expand Down

0 comments on commit fd56a3d

Please sign in to comment.