Skip to content

Commit

Permalink
logs: remove logging in GetDurabilityPolicy since it is overtly noisy…
Browse files Browse the repository at this point in the history
… and move it to places which will only be called less frequently (#10516) (#10518)

Signed-off-by: Manan Gupta <manan@planetscale.com>
  • Loading branch information
GuptaManan100 committed Jun 16, 2022
1 parent 9c74850 commit 4911839
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions go/vt/vtctl/grpcvtctldserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ func (s *VtctldServer) ChangeTabletType(ctx context.Context, req *vtctldatapb.Ch
if err != nil {
return nil, err
}
log.Infof("Getting a new durability policy for %v", durabilityName)
durability, err := reparentutil.GetDurabilityPolicy(durabilityName)
if err != nil {
return nil, err
Expand Down Expand Up @@ -1750,6 +1751,7 @@ func (s *VtctldServer) InitShardPrimaryLocked(
if err != nil {
return err
}
log.Infof("Getting a new durability policy for %v", durabilityName)
durability, err := reparentutil.GetDurabilityPolicy(durabilityName)
if err != nil {
return err
Expand Down Expand Up @@ -2324,6 +2326,7 @@ func (s *VtctldServer) ReparentTablet(ctx context.Context, req *vtctldatapb.Repa
if err != nil {
return nil, err
}
log.Infof("Getting a new durability policy for %v", durabilityName)
durability, err := reparentutil.GetDurabilityPolicy(durabilityName)
if err != nil {
return nil, err
Expand Down Expand Up @@ -3035,6 +3038,7 @@ func (s *VtctldServer) StartReplication(ctx context.Context, req *vtctldatapb.St
if err != nil {
return nil, err
}
log.Infof("Getting a new durability policy for %v", durabilityName)
durability, err := reparentutil.GetDurabilityPolicy(durabilityName)
if err != nil {
return nil, err
Expand Down Expand Up @@ -3133,6 +3137,7 @@ func (s *VtctldServer) TabletExternallyReparented(ctx context.Context, req *vtct
if err != nil {
return nil, err
}
log.Infof("Getting a new durability policy for %v", durabilityName)
durability, err := reparentutil.GetDurabilityPolicy(durabilityName)
if err != nil {
return nil, err
Expand Down
1 change: 0 additions & 1 deletion go/vt/vtctl/reparentutil/durability.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func GetDurabilityPolicy(name string) (Durabler, error) {
if !found {
return nil, fmt.Errorf("durability policy %v not found", name)
}
log.Infof("Getting a new durability policy for %v", name)
return newDurabilityCreationFunc(), nil
}

Expand Down
1 change: 1 addition & 0 deletions go/vt/vtctl/reparentutil/emergency_reparenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func (erp *EmergencyReparenter) reparentShardLocked(ctx context.Context, ev *eve
return err
}

erp.logger.Infof("Getting a new durability policy for %v", keyspaceDurability)
opts.durability, err = GetDurabilityPolicy(keyspaceDurability)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions go/vt/vtctl/reparentutil/planned_reparenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ func (pr *PlannedReparenter) reparentShardLocked(
return err
}

pr.logger.Infof("Getting a new durability policy for %v", keyspaceDurability)
opts.durability, err = GetDurabilityPolicy(keyspaceDurability)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions go/vt/vtctl/reparentutil/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func SetReplicationSource(ctx context.Context, ts *topo.Server, tmc tmclient.Tab
if err != nil {
return err
}
log.Infof("Getting a new durability policy for %v", durabilityName)
durability, err := GetDurabilityPolicy(durabilityName)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions go/vt/wrangler/reparent.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ func (wr *Wrangler) TabletExternallyReparented(ctx context.Context, newPrimaryAl
if err != nil {
return err
}
log.Infof("Getting a new durability policy for %v", durabilityName)
durability, err := reparentutil.GetDurabilityPolicy(durabilityName)
if err != nil {
return err
Expand Down

0 comments on commit 4911839

Please sign in to comment.