mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-20 22:27:04 +00:00
reduce masterClient log verbosity for shell startup
Move bootstraps, gRPC stream established, and leader redirect logs from V(0) to V(1) to keep weed shell output clean.
This commit is contained in:
@@ -234,7 +234,7 @@ func (mc *MasterClient) tryConnectToMaster(ctx context.Context, master pb.Server
|
||||
stats.MasterClientConnectCounter.WithLabelValues(stats.FailedToKeepConnected).Inc()
|
||||
return err
|
||||
}
|
||||
glog.V(0).Infof("%s.%s masterClient gRPC stream established to %s in %v", mc.FilerGroup, mc.clientType, master, time.Since(connectStartTime))
|
||||
glog.V(1).Infof("%s.%s masterClient gRPC stream established to %s in %v", mc.FilerGroup, mc.clientType, master, time.Since(connectStartTime))
|
||||
|
||||
if err = stream.Send(&master_pb.KeepConnectedRequest{
|
||||
FilerGroup: mc.FilerGroup,
|
||||
@@ -265,7 +265,7 @@ func (mc *MasterClient) tryConnectToMaster(ctx context.Context, master pb.Server
|
||||
// check if it is the leader to determine whether to reset the vidMap
|
||||
if resp.VolumeLocation != nil {
|
||||
if resp.VolumeLocation.Leader != "" && string(master) != resp.VolumeLocation.Leader {
|
||||
glog.V(0).Infof("master %v redirected to leader %v", master, resp.VolumeLocation.Leader)
|
||||
glog.V(1).Infof("master %v redirected to leader %v", master, resp.VolumeLocation.Leader)
|
||||
nextHintedLeader = pb.ServerAddress(resp.VolumeLocation.Leader)
|
||||
stats.MasterClientConnectCounter.WithLabelValues(stats.RedirectedToLeader).Inc()
|
||||
return nil
|
||||
@@ -296,7 +296,7 @@ func (mc *MasterClient) tryConnectToMaster(ctx context.Context, master pb.Server
|
||||
// Check for leader change during the stream
|
||||
// If master announces a new leader, reconnect to it
|
||||
if resp.VolumeLocation.Leader != "" && string(mc.GetMaster(ctx)) != resp.VolumeLocation.Leader {
|
||||
glog.V(0).Infof("currentMaster %v redirected to leader %v", mc.GetMaster(ctx), resp.VolumeLocation.Leader)
|
||||
glog.V(1).Infof("currentMaster %v redirected to leader %v", mc.GetMaster(ctx), resp.VolumeLocation.Leader)
|
||||
nextHintedLeader = pb.ServerAddress(resp.VolumeLocation.Leader)
|
||||
stats.MasterClientConnectCounter.WithLabelValues(stats.RedirectedToLeader).Inc()
|
||||
return nil
|
||||
@@ -469,7 +469,7 @@ func (mc *MasterClient) WaitUntilConnected(ctx context.Context) {
|
||||
}
|
||||
|
||||
func (mc *MasterClient) KeepConnectedToMaster(ctx context.Context) {
|
||||
glog.V(0).Infof("%s.%s masterClient bootstraps with masters %v", mc.FilerGroup, mc.clientType, mc.masters)
|
||||
glog.V(1).Infof("%s.%s masterClient bootstraps with masters %v", mc.FilerGroup, mc.clientType, mc.masters)
|
||||
reconnectCount := 0
|
||||
for {
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user