diff --git a/pkg/dnservice/store.go b/pkg/dnservice/store.go index 4c937b2b66bed8032e786b742d0e5575b2f4ad50..aaf5698cade86bc4d3648709b1dec1eb7f8044c1 100644 --- a/pkg/dnservice/store.go +++ b/pkg/dnservice/store.go @@ -238,6 +238,9 @@ func (s *store) heartbeatTask(ctx context.Context) { } for _, cmd := range commands.Commands { + s.logger.Debug("received hakeeper command", + zap.String("cmd", cmd.LogString())) + if cmd.ServiceType != logservicepb.DnService { s.logger.Fatal("receive invalid schedule command", zap.String("type", cmd.ServiceType.String())) @@ -270,8 +273,11 @@ func (s *store) heartbeatTask(ctx context.Context) { func (s *store) createReplica(shard metadata.DNShard) error { r := newReplica(shard, s.logger.With(util.TxnDNShardField(shard))) - _, ok := s.replicas.LoadOrStore(shard.ShardID, r) + v, ok := s.replicas.LoadOrStore(shard.ShardID, r) if ok { + s.logger.Debug("DNShard already created", + zap.String("new", shard.DebugString()), + zap.String("exist", v.(*replica).shard.DebugString())) return nil }