Skip to content

Commit

Permalink
*: remove the tombstone store metrics (tikv#7504)
Browse files Browse the repository at this point in the history
ref tikv#5839

Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Dec 7, 2023
1 parent 995fcef commit ad232d1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/mcs/scheduling/server/meta/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ package meta

import (
"context"
"strconv"
"sync"

"github.com/gogo/protobuf/proto"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/log"
"github.com/tikv/pd/pkg/core"
"github.com/tikv/pd/pkg/statistics"
"github.com/tikv/pd/pkg/storage/endpoint"
"github.com/tikv/pd/pkg/utils/etcdutil"
"go.etcd.io/etcd/clientv3"
Expand Down Expand Up @@ -79,9 +81,15 @@ func (w *Watcher) initializeStoreWatcher() error {
origin := w.basicCluster.GetStore(store.GetId())
if origin == nil {
w.basicCluster.PutStore(core.NewStoreInfo(store))
return nil
} else {
w.basicCluster.PutStore(origin.Clone(core.SetStoreMeta(store)))
}
w.basicCluster.PutStore(origin.Clone(core.SetStoreMeta(store)))

if store.GetNodeState() == metapb.NodeState_Removed {
statistics.ResetStoreStatistics(store.GetAddress(), strconv.FormatUint(store.GetId(), 10))
// TODO: remove hot stats
}

return nil
}
deleteFn := func(kv *mvccpb.KeyValue) error {
Expand Down

0 comments on commit ad232d1

Please sign in to comment.